<!-- HTML header for doxygen 1.8.14-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="cache-control" content="max-age=86400"/>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>GBDK 2020 Docs: gbdk-lib/include/gb/gb.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen_extra.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">GBDK 2020 Docs
   &#160;<span id="projectnumber">4.4.0</span>
   </div>
   <div id="projectbrief">API Documentation for GBDK 2020</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('gb_8h.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">gb.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;types.h&gt;</code><br />
<code>#include &lt;<a class="el" href="stdint_8h_source.html">stdint.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="version_8h_source.html">gbdk/version.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="gb_2hardware_8h_source.html">gb/hardware.h</a>&gt;</code><br />
</div>
<p><a href="gb_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjoypads__t.html">joypads_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_o_a_m__item__t.html">OAM_item_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a385397587c93683e8e11afb712e2960b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a385397587c93683e8e11afb712e2960b">NINTENDO</a></td></tr>
<tr class="separator:a385397587c93683e8e11afb712e2960b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99bca2df4c6fde16a659797b4e584036"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a99bca2df4c6fde16a659797b4e584036">SYSTEM_60HZ</a>&#160;&#160;&#160;0x00</td></tr>
<tr class="separator:a99bca2df4c6fde16a659797b4e584036"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6329c19927cf02579e2503e40c0bbde"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ad6329c19927cf02579e2503e40c0bbde">SYSTEM_50HZ</a>&#160;&#160;&#160;0x01</td></tr>
<tr class="separator:ad6329c19927cf02579e2503e40c0bbde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af10046e88cba47031142a763a94210df"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#af10046e88cba47031142a763a94210df">GAMEBOY</a></td></tr>
<tr class="separator:af10046e88cba47031142a763a94210df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05ca817ab32f6da612c3ae26db5abf02"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a05ca817ab32f6da612c3ae26db5abf02">J_UP</a>&#160;&#160;&#160;0x04U</td></tr>
<tr class="separator:a05ca817ab32f6da612c3ae26db5abf02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae032c5c544196e37ec0432f6cfad7904"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ae032c5c544196e37ec0432f6cfad7904">J_DOWN</a>&#160;&#160;&#160;0x08U</td></tr>
<tr class="separator:ae032c5c544196e37ec0432f6cfad7904"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac70894fecac30c1ca9917f07373cf81c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ac70894fecac30c1ca9917f07373cf81c">J_LEFT</a>&#160;&#160;&#160;0x02U</td></tr>
<tr class="separator:ac70894fecac30c1ca9917f07373cf81c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3bad91d11ae09ffcbb3cb0a81873d325"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a3bad91d11ae09ffcbb3cb0a81873d325">J_RIGHT</a>&#160;&#160;&#160;0x01U</td></tr>
<tr class="separator:a3bad91d11ae09ffcbb3cb0a81873d325"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31af766e3b598eb7a6b63f55a4988e7a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a31af766e3b598eb7a6b63f55a4988e7a">J_A</a>&#160;&#160;&#160;0x10U</td></tr>
<tr class="separator:a31af766e3b598eb7a6b63f55a4988e7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae47e59a309120f9420993f26816b5e6d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ae47e59a309120f9420993f26816b5e6d">J_B</a>&#160;&#160;&#160;0x20U</td></tr>
<tr class="separator:ae47e59a309120f9420993f26816b5e6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab416a9d96d1582490828f4bac78a8b5b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ab416a9d96d1582490828f4bac78a8b5b">J_SELECT</a>&#160;&#160;&#160;0x40U</td></tr>
<tr class="separator:ab416a9d96d1582490828f4bac78a8b5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab769c6e20778298be8bc3321476ceb53"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ab769c6e20778298be8bc3321476ceb53">J_START</a>&#160;&#160;&#160;0x80U</td></tr>
<tr class="separator:ab769c6e20778298be8bc3321476ceb53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc9798fc62b5d626c91c8b0f20b522ff"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#acc9798fc62b5d626c91c8b0f20b522ff">M_DRAWING</a>&#160;&#160;&#160;0x01U</td></tr>
<tr class="separator:acc9798fc62b5d626c91c8b0f20b522ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0e30d6af308ffe5a025fbe85da40f6f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#af0e30d6af308ffe5a025fbe85da40f6f">M_TEXT_OUT</a>&#160;&#160;&#160;0x02U</td></tr>
<tr class="separator:af0e30d6af308ffe5a025fbe85da40f6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a908826e7180f94a5988ceb8633313a2e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a908826e7180f94a5988ceb8633313a2e">M_TEXT_INOUT</a>&#160;&#160;&#160;0x03U</td></tr>
<tr class="separator:a908826e7180f94a5988ceb8633313a2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04382de20738146fe873ddfb0585052b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a04382de20738146fe873ddfb0585052b">M_NO_SCROLL</a>&#160;&#160;&#160;0x04U</td></tr>
<tr class="separator:a04382de20738146fe873ddfb0585052b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca2855edd2d28f66be551a0f7ec23f07"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aca2855edd2d28f66be551a0f7ec23f07">M_NO_INTERP</a>&#160;&#160;&#160;0x08U</td></tr>
<tr class="separator:aca2855edd2d28f66be551a0f7ec23f07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33caf10f6d1a7cbb6bd07b899c1a545f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a33caf10f6d1a7cbb6bd07b899c1a545f">S_BANK</a>&#160;&#160;&#160;0x08U</td></tr>
<tr class="separator:a33caf10f6d1a7cbb6bd07b899c1a545f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54572cf6791463b6d60623837e0bb5a6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a54572cf6791463b6d60623837e0bb5a6">S_PALETTE</a>&#160;&#160;&#160;0x10U</td></tr>
<tr class="separator:a54572cf6791463b6d60623837e0bb5a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae97793b4039609f93b0f7f8bddb18011"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ae97793b4039609f93b0f7f8bddb18011">S_FLIPX</a>&#160;&#160;&#160;0x20U</td></tr>
<tr class="separator:ae97793b4039609f93b0f7f8bddb18011"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bbb9cd6c38b2317de5256d1d889c63b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a4bbb9cd6c38b2317de5256d1d889c63b">S_FLIPY</a>&#160;&#160;&#160;0x40U</td></tr>
<tr class="separator:a4bbb9cd6c38b2317de5256d1d889c63b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9506d04c2ec7d2442a52054f67d2b32f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a9506d04c2ec7d2442a52054f67d2b32f">S_PRIORITY</a>&#160;&#160;&#160;0x80U</td></tr>
<tr class="separator:a9506d04c2ec7d2442a52054f67d2b32f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a826169925ff12d52f0a0d51f14d2936b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a826169925ff12d52f0a0d51f14d2936b">S_PAL</a>(n)&#160;&#160;&#160;n</td></tr>
<tr class="separator:a826169925ff12d52f0a0d51f14d2936b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa027abe630d44039f238034bcb2d2f36"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aa027abe630d44039f238034bcb2d2f36">EMPTY_IFLAG</a>&#160;&#160;&#160;0x00U</td></tr>
<tr class="separator:aa027abe630d44039f238034bcb2d2f36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ca7720b9a5da9b2173e1f74dba85541"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a2ca7720b9a5da9b2173e1f74dba85541">VBL_IFLAG</a>&#160;&#160;&#160;0x01U</td></tr>
<tr class="separator:a2ca7720b9a5da9b2173e1f74dba85541"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61a9e2910380de6abb34df14ef634eb4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a61a9e2910380de6abb34df14ef634eb4">LCD_IFLAG</a>&#160;&#160;&#160;0x02U</td></tr>
<tr class="separator:a61a9e2910380de6abb34df14ef634eb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a604256210ec5b90b68185e1a18efab49"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a604256210ec5b90b68185e1a18efab49">TIM_IFLAG</a>&#160;&#160;&#160;0x04U</td></tr>
<tr class="separator:a604256210ec5b90b68185e1a18efab49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad90564458646c5646b3880b93db3443e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ad90564458646c5646b3880b93db3443e">SIO_IFLAG</a>&#160;&#160;&#160;0x08U</td></tr>
<tr class="separator:ad90564458646c5646b3880b93db3443e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f829cf27d6e3e24c875e9b82dfcb280"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a2f829cf27d6e3e24c875e9b82dfcb280">JOY_IFLAG</a>&#160;&#160;&#160;0x10U</td></tr>
<tr class="separator:a2f829cf27d6e3e24c875e9b82dfcb280"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab311e53739c992294ae07ca506a924ad"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ab311e53739c992294ae07ca506a924ad">DMG_BLACK</a>&#160;&#160;&#160;0x03</td></tr>
<tr class="separator:ab311e53739c992294ae07ca506a924ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45d13a674e169dd83df7e1f46513ccba"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a45d13a674e169dd83df7e1f46513ccba">DMG_DARK_GRAY</a>&#160;&#160;&#160;0x02</td></tr>
<tr class="separator:a45d13a674e169dd83df7e1f46513ccba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ccd6732d3bdf390cc0943e8567341f3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a8ccd6732d3bdf390cc0943e8567341f3">DMG_LITE_GRAY</a>&#160;&#160;&#160;0x01</td></tr>
<tr class="separator:a8ccd6732d3bdf390cc0943e8567341f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11cedc2ee58acfbbfc48dfb2b9a551b3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a11cedc2ee58acfbbfc48dfb2b9a551b3">DMG_WHITE</a>&#160;&#160;&#160;0x00</td></tr>
<tr class="separator:a11cedc2ee58acfbbfc48dfb2b9a551b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9727caafc483ba6ec65e9344b033d684"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a9727caafc483ba6ec65e9344b033d684">DMG_PALETTE</a>(C0,  C1,  C2,  C3)&#160;&#160;&#160;((<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)((((C3) &amp; 0x03) &lt;&lt; 6) | (((C2) &amp; 0x03) &lt;&lt; 4) | (((C1) &amp; 0x03) &lt;&lt; 2) | ((C0) &amp; 0x03)))</td></tr>
<tr class="separator:a9727caafc483ba6ec65e9344b033d684"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada0cc738d27aad251151e69cb8d250e1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ada0cc738d27aad251151e69cb8d250e1">SCREENWIDTH</a>&#160;&#160;&#160;<a class="el" href="sms_2hardware_8h.html#ad14c51cdfb347c34c364f54e67dc978d">DEVICE_SCREEN_PX_WIDTH</a></td></tr>
<tr class="separator:ada0cc738d27aad251151e69cb8d250e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae189e98d0ef9263c37869ce1ff3710a5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ae189e98d0ef9263c37869ce1ff3710a5">SCREENHEIGHT</a>&#160;&#160;&#160;<a class="el" href="sms_2hardware_8h.html#a7bd450aa268b881257089cf8cd6697ec">DEVICE_SCREEN_PX_HEIGHT</a></td></tr>
<tr class="separator:ae189e98d0ef9263c37869ce1ff3710a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a796bbf3e4347d914b83568350143a9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a5a796bbf3e4347d914b83568350143a9">MINWNDPOSX</a>&#160;&#160;&#160;<a class="el" href="nes_2hardware_8h.html#a62cb8564bf5e8cdd85ac33bc1c7896f2">DEVICE_WINDOW_PX_OFFSET_X</a></td></tr>
<tr class="separator:a5a796bbf3e4347d914b83568350143a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3d632ba2d7cef6619df5dfea8730909"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#af3d632ba2d7cef6619df5dfea8730909">MINWNDPOSY</a>&#160;&#160;&#160;<a class="el" href="nes_2hardware_8h.html#a3f8565ca9dc8eacd88d0d58313408329">DEVICE_WINDOW_PX_OFFSET_Y</a></td></tr>
<tr class="separator:af3d632ba2d7cef6619df5dfea8730909"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6dffb66ec1b1d9bb380a1af52a601ec5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a6dffb66ec1b1d9bb380a1af52a601ec5">MAXWNDPOSX</a>&#160;&#160;&#160;(<a class="el" href="nes_2hardware_8h.html#a62cb8564bf5e8cdd85ac33bc1c7896f2">DEVICE_WINDOW_PX_OFFSET_X</a> + <a class="el" href="sms_2hardware_8h.html#ad14c51cdfb347c34c364f54e67dc978d">DEVICE_SCREEN_PX_WIDTH</a> - 1)</td></tr>
<tr class="separator:a6dffb66ec1b1d9bb380a1af52a601ec5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad57f2f8c54204687f02801d8ab1bd150"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ad57f2f8c54204687f02801d8ab1bd150">MAXWNDPOSY</a>&#160;&#160;&#160;(<a class="el" href="nes_2hardware_8h.html#a3f8565ca9dc8eacd88d0d58313408329">DEVICE_WINDOW_PX_OFFSET_Y</a> + <a class="el" href="sms_2hardware_8h.html#a7bd450aa268b881257089cf8cd6697ec">DEVICE_SCREEN_PX_HEIGHT</a> - 1)</td></tr>
<tr class="separator:ad57f2f8c54204687f02801d8ab1bd150"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0031c07799247a6d6c1bfa3decac79d0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a0031c07799247a6d6c1bfa3decac79d0">DMG_TYPE</a>&#160;&#160;&#160;0x01</td></tr>
<tr class="separator:a0031c07799247a6d6c1bfa3decac79d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae996ed4fd8bb6b308b9c8708a91df06b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ae996ed4fd8bb6b308b9c8708a91df06b">MGB_TYPE</a>&#160;&#160;&#160;0xFF</td></tr>
<tr class="separator:ae996ed4fd8bb6b308b9c8708a91df06b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee435a3a0dde3dbd7b6112dbb456cde8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aee435a3a0dde3dbd7b6112dbb456cde8">CGB_TYPE</a>&#160;&#160;&#160;0x11</td></tr>
<tr class="separator:aee435a3a0dde3dbd7b6112dbb456cde8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa311f84dd9fce6e136ba4881e7b0d98d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aa311f84dd9fce6e136ba4881e7b0d98d">GBA_NOT_DETECTED</a>&#160;&#160;&#160;0x00</td></tr>
<tr class="separator:aa311f84dd9fce6e136ba4881e7b0d98d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ccf5d0f34fb0af0b6e73b9df0ccd745"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a6ccf5d0f34fb0af0b6e73b9df0ccd745">GBA_DETECTED</a>&#160;&#160;&#160;0x01</td></tr>
<tr class="separator:a6ccf5d0f34fb0af0b6e73b9df0ccd745"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a231ec05679809190782e61c6e8aaaba4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a231ec05679809190782e61c6e8aaaba4">DEVICE_SUPPORTS_COLOR</a>&#160;&#160;&#160;(<a class="el" href="gb_8h.html#a874b9bd95b0a05d6a6072feabc879e45">_cpu</a> == <a class="el" href="gb_8h.html#aee435a3a0dde3dbd7b6112dbb456cde8">CGB_TYPE</a>)</td></tr>
<tr class="separator:a231ec05679809190782e61c6e8aaaba4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a559dbd32dba6867c1ee4e481077b62ab"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a559dbd32dba6867c1ee4e481077b62ab">VBL_DONE</a>&#160;&#160;&#160;<a class="el" href="sms_8h.html#a379ebafd4dc456a9a0c10290bb38fe7c">_vbl_done</a></td></tr>
<tr class="separator:a559dbd32dba6867c1ee4e481077b62ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a268cc6c704e16f3fa02dd1cf0e17070a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a268cc6c704e16f3fa02dd1cf0e17070a">IO_IDLE</a>&#160;&#160;&#160;0x00U</td></tr>
<tr class="separator:a268cc6c704e16f3fa02dd1cf0e17070a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab69a3f7cd2c6b5eb4f518aefee099007"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ab69a3f7cd2c6b5eb4f518aefee099007">IO_SENDING</a>&#160;&#160;&#160;0x01U</td></tr>
<tr class="separator:ab69a3f7cd2c6b5eb4f518aefee099007"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee03efddee0f2f6fbcaec789301aaa9b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aee03efddee0f2f6fbcaec789301aaa9b">IO_RECEIVING</a>&#160;&#160;&#160;0x02U</td></tr>
<tr class="separator:aee03efddee0f2f6fbcaec789301aaa9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d4c9c7b61a0326a939f9109f96d7423"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a5d4c9c7b61a0326a939f9109f96d7423">IO_ERROR</a>&#160;&#160;&#160;0x04U</td></tr>
<tr class="separator:a5d4c9c7b61a0326a939f9109f96d7423"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae042588f20bf5a2349c8ad8716245233"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ae042588f20bf5a2349c8ad8716245233">CURRENT_BANK</a>&#160;&#160;&#160;<a class="el" href="nes_8h.html#a06bab3f8bce032de0d21fbd86e14c3f3">_current_bank</a></td></tr>
<tr class="separator:ae042588f20bf5a2349c8ad8716245233"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42705001e2b9897f5167b67fb36c69dd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a42705001e2b9897f5167b67fb36c69dd">BANK</a>(VARNAME)&#160;&#160;&#160;( (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>) &amp; __bank_ ## VARNAME )</td></tr>
<tr class="separator:a42705001e2b9897f5167b67fb36c69dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a086293f2afb4c7945460a4496b20aea3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a086293f2afb4c7945460a4496b20aea3">BANKREF</a>(VARNAME)</td></tr>
<tr class="separator:a086293f2afb4c7945460a4496b20aea3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a261bba55a07b802baf99346feadd9852"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a261bba55a07b802baf99346feadd9852">BANKREF_EXTERN</a>(VARNAME)&#160;&#160;&#160;extern const void __bank_ ## VARNAME;</td></tr>
<tr class="separator:a261bba55a07b802baf99346feadd9852"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af61262bbc05629f31020afce67e1b9ea"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#af61262bbc05629f31020afce67e1b9ea">SWITCH_ROM</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)&#160;&#160;&#160;(<a class="el" href="nes_8h.html#a06bab3f8bce032de0d21fbd86e14c3f3">_current_bank</a> = (<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>), <a class="el" href="gb_2hardware_8h.html#ae0976a29e341edc6ceb810e6eb0328f1">rROMB0</a> = (<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>))</td></tr>
<tr class="separator:af61262bbc05629f31020afce67e1b9ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a121feb0c32d124562f52398aa9656e7b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a121feb0c32d124562f52398aa9656e7b">SWITCH_RAM</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)&#160;&#160;&#160;(<a class="el" href="gb_2hardware_8h.html#ac2985dbccb16c4c00381d6fbe9600aff">rRAMB</a> = (<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>))</td></tr>
<tr class="separator:a121feb0c32d124562f52398aa9656e7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e9c88657beaac946231a4801481b97f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a0e9c88657beaac946231a4801481b97f">ENABLE_RAM</a>&#160;&#160;&#160;(<a class="el" href="gb_2hardware_8h.html#a64dd59016e4f0e78672962fbc553a4b4">rRAMG</a> = 0x0A)</td></tr>
<tr class="separator:a0e9c88657beaac946231a4801481b97f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a649d27b5587de16a66176e03a1b8ebd5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a649d27b5587de16a66176e03a1b8ebd5">DISABLE_RAM</a>&#160;&#160;&#160;(<a class="el" href="gb_2hardware_8h.html#a64dd59016e4f0e78672962fbc553a4b4">rRAMG</a> = 0x00)</td></tr>
<tr class="separator:a649d27b5587de16a66176e03a1b8ebd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3fca2d0a22aa2717e62fed659caf4743"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a3fca2d0a22aa2717e62fed659caf4743">SWITCH_ROM_MEGADUCK</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)&#160;&#160;&#160;<a class="el" href="msx_8h.html#ac996706e2a5e73f010841437f26d4d4f">SWITCH_ROM</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)</td></tr>
<tr class="separator:a3fca2d0a22aa2717e62fed659caf4743"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19558f5bbc9fea767f945001ae9cd13f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a19558f5bbc9fea767f945001ae9cd13f">SWITCH_ROM_MBC1</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)&#160;&#160;&#160;<a class="el" href="msx_8h.html#ac996706e2a5e73f010841437f26d4d4f">SWITCH_ROM</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)</td></tr>
<tr class="separator:a19558f5bbc9fea767f945001ae9cd13f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38ea3e4dfe02b8eae70df27f39d4a951"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a38ea3e4dfe02b8eae70df27f39d4a951">SWITCH_RAM_MBC1</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)&#160;&#160;&#160;<a class="el" href="sms_8h.html#a121feb0c32d124562f52398aa9656e7b">SWITCH_RAM</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)</td></tr>
<tr class="separator:a38ea3e4dfe02b8eae70df27f39d4a951"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae202f64307ec00f6970ef9225e54646c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ae202f64307ec00f6970ef9225e54646c">ENABLE_RAM_MBC1</a>&#160;&#160;&#160;<a class="el" href="sms_8h.html#a0e9c88657beaac946231a4801481b97f">ENABLE_RAM</a></td></tr>
<tr class="separator:ae202f64307ec00f6970ef9225e54646c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a177fadce938422926b186a8e42575d1d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a177fadce938422926b186a8e42575d1d">DISABLE_RAM_MBC1</a>&#160;&#160;&#160;<a class="el" href="sms_8h.html#a649d27b5587de16a66176e03a1b8ebd5">DISABLE_RAM</a></td></tr>
<tr class="separator:a177fadce938422926b186a8e42575d1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c689c5a814f1c347c4d98f28ed6c7d6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a0c689c5a814f1c347c4d98f28ed6c7d6">SWITCH_16_8_MODE_MBC1</a>&#160;&#160;&#160;(*(volatile <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *)0x6000 = 0x00)</td></tr>
<tr class="separator:a0c689c5a814f1c347c4d98f28ed6c7d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5d64e386a00b373f22ffdc5a152c7ba"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aa5d64e386a00b373f22ffdc5a152c7ba">SWITCH_4_32_MODE_MBC1</a>&#160;&#160;&#160;(*(volatile <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *)0x6000 = 0x01)</td></tr>
<tr class="separator:aa5d64e386a00b373f22ffdc5a152c7ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92d040284342702026eb19dab59b586e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a92d040284342702026eb19dab59b586e">SWITCH_ROM_MBC5</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)&#160;&#160;&#160;(<a class="el" href="nes_8h.html#a06bab3f8bce032de0d21fbd86e14c3f3">_current_bank</a> = (<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>), <a class="el" href="gb_2hardware_8h.html#a014f3a9d7ce8f8026c9ac6c0410bb099">rROMB1</a> = 0, <a class="el" href="gb_2hardware_8h.html#ae0976a29e341edc6ceb810e6eb0328f1">rROMB0</a> = (<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>))</td></tr>
<tr class="separator:a92d040284342702026eb19dab59b586e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c15ebc660abd3a978137493ab63ffe9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a6c15ebc660abd3a978137493ab63ffe9">SWITCH_ROM_MBC5_8M</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)&#160;&#160;&#160;(<a class="el" href="gb_2hardware_8h.html#a014f3a9d7ce8f8026c9ac6c0410bb099">rROMB1</a> = ((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>) &gt;&gt; 8), <a class="el" href="gb_2hardware_8h.html#ae0976a29e341edc6ceb810e6eb0328f1">rROMB0</a> = (<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>))</td></tr>
<tr class="separator:a6c15ebc660abd3a978137493ab63ffe9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a361d5055a7ae880fc1c9d6e0d1164fd6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a361d5055a7ae880fc1c9d6e0d1164fd6">SWITCH_RAM_MBC5</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)&#160;&#160;&#160;<a class="el" href="sms_8h.html#a121feb0c32d124562f52398aa9656e7b">SWITCH_RAM</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)</td></tr>
<tr class="separator:a361d5055a7ae880fc1c9d6e0d1164fd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f033f00c8d781637f9a665b06750937"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a3f033f00c8d781637f9a665b06750937">ENABLE_RAM_MBC5</a>&#160;&#160;&#160;<a class="el" href="sms_8h.html#a0e9c88657beaac946231a4801481b97f">ENABLE_RAM</a></td></tr>
<tr class="separator:a3f033f00c8d781637f9a665b06750937"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60191cdfa50ed9b88515f181747eaba2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a60191cdfa50ed9b88515f181747eaba2">DISABLE_RAM_MBC5</a>&#160;&#160;&#160;<a class="el" href="sms_8h.html#a649d27b5587de16a66176e03a1b8ebd5">DISABLE_RAM</a></td></tr>
<tr class="separator:a60191cdfa50ed9b88515f181747eaba2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ae6b05b3e1559c97f0d1b2daaaa0ee4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a5ae6b05b3e1559c97f0d1b2daaaa0ee4">DISPLAY_ON</a>&#160;&#160;&#160;  <a class="el" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a>|=<a class="el" href="gb_2hardware_8h.html#a1491fc03ed7f02e7309cc7b0c48b6c8a">LCDCF_ON</a></td></tr>
<tr class="separator:a5ae6b05b3e1559c97f0d1b2daaaa0ee4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2ec9831813c5e7069917aa4455af682"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ad2ec9831813c5e7069917aa4455af682">DISPLAY_OFF</a>&#160;&#160;&#160;  <a class="el" href="sms_8h.html#afe5714734a8fea7b1617ba377b3c0a06">display_off</a>();</td></tr>
<tr class="separator:ad2ec9831813c5e7069917aa4455af682"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0659212acd317ccdebc0ecf435df330f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a0659212acd317ccdebc0ecf435df330f">HIDE_LEFT_COLUMN</a></td></tr>
<tr class="separator:a0659212acd317ccdebc0ecf435df330f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5497c2255a9474d397446710189eacbe"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a5497c2255a9474d397446710189eacbe">SHOW_LEFT_COLUMN</a></td></tr>
<tr class="separator:a5497c2255a9474d397446710189eacbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f3f7bd5879b807acbb203ce2aaa1e5d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a3f3f7bd5879b807acbb203ce2aaa1e5d">SET_BORDER_COLOR</a>(C)</td></tr>
<tr class="separator:a3f3f7bd5879b807acbb203ce2aaa1e5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e3f36aa68ac036695816757f2a1322c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a>&#160;&#160;&#160;  <a class="el" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a>|=<a class="el" href="gb_2hardware_8h.html#a97ab19d938f05bffbcb4221824c3bfce">LCDCF_BGON</a></td></tr>
<tr class="separator:a8e3f36aa68ac036695816757f2a1322c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d25f7c43b1cbbb48b95cda7ab2c3141"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a6d25f7c43b1cbbb48b95cda7ab2c3141">HIDE_BKG</a>&#160;&#160;&#160;  <a class="el" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a>&amp;=~<a class="el" href="gb_2hardware_8h.html#a97ab19d938f05bffbcb4221824c3bfce">LCDCF_BGON</a></td></tr>
<tr class="separator:a6d25f7c43b1cbbb48b95cda7ab2c3141"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab19da2ab719bb8897bc0843a84af28f8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ab19da2ab719bb8897bc0843a84af28f8">SHOW_WIN</a>&#160;&#160;&#160;  <a class="el" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a>|=<a class="el" href="gb_2hardware_8h.html#a13a5f08b9aae68f8fa57a8aa7705b732">LCDCF_WINON</a></td></tr>
<tr class="separator:ab19da2ab719bb8897bc0843a84af28f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aedb6e32c42d4b1d25ad11adccd7100c3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aedb6e32c42d4b1d25ad11adccd7100c3">HIDE_WIN</a>&#160;&#160;&#160;  <a class="el" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a>&amp;=~<a class="el" href="gb_2hardware_8h.html#a13a5f08b9aae68f8fa57a8aa7705b732">LCDCF_WINON</a></td></tr>
<tr class="separator:aedb6e32c42d4b1d25ad11adccd7100c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a495bc9f405f916f02ad5d97e6e730134"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a495bc9f405f916f02ad5d97e6e730134">SHOW_SPRITES</a>&#160;&#160;&#160;  <a class="el" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a>|=<a class="el" href="gb_2hardware_8h.html#a6aef42158c90e8025b8341cdea2e3918">LCDCF_OBJON</a></td></tr>
<tr class="separator:a495bc9f405f916f02ad5d97e6e730134"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69ef98aee664b8abd8d1a3d45f016dda"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a69ef98aee664b8abd8d1a3d45f016dda">HIDE_SPRITES</a>&#160;&#160;&#160;  <a class="el" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a>&amp;=~<a class="el" href="gb_2hardware_8h.html#a6aef42158c90e8025b8341cdea2e3918">LCDCF_OBJON</a></td></tr>
<tr class="separator:a69ef98aee664b8abd8d1a3d45f016dda"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af91d252f07f4764996154820f970c101"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#af91d252f07f4764996154820f970c101">SPRITES_8x16</a>&#160;&#160;&#160;  <a class="el" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a>|=<a class="el" href="gb_2hardware_8h.html#a14eddd3d53d8e649f1754bd455b4863d">LCDCF_OBJ16</a></td></tr>
<tr class="separator:af91d252f07f4764996154820f970c101"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa87bec0d134136fdb727f52cb773b792"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aa87bec0d134136fdb727f52cb773b792">SPRITES_8x8</a>&#160;&#160;&#160;  <a class="el" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a>&amp;=~<a class="el" href="gb_2hardware_8h.html#a14eddd3d53d8e649f1754bd455b4863d">LCDCF_OBJ16</a></td></tr>
<tr class="separator:aa87bec0d134136fdb727f52cb773b792"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67f80e65620470b55a4950e2966eb868"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a67f80e65620470b55a4950e2966eb868">COMPAT_PALETTE</a>(C0,  C1,  C2,  C3)&#160;&#160;&#160;((<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)(((C3) &lt;&lt; 6) | ((C2) &lt;&lt; 4) | ((C1) &lt;&lt; 2) | (C0)))</td></tr>
<tr class="separator:a67f80e65620470b55a4950e2966eb868"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab94bfec130df50d9cb808142f94603a5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ab94bfec130df50d9cb808142f94603a5">set_bkg_2bpp_data</a>&#160;&#160;&#160;<a class="el" href="sms_8h.html#a8130306da1177f4fef89e699f8e2add4">set_bkg_data</a></td></tr>
<tr class="separator:ab94bfec130df50d9cb808142f94603a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55f82ff980398dd97036fd936ebd727e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a55f82ff980398dd97036fd936ebd727e">set_tile_map</a>&#160;&#160;&#160;<a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a></td></tr>
<tr class="separator:a55f82ff980398dd97036fd936ebd727e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb5d0970167b81401113812773c90838"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#adb5d0970167b81401113812773c90838">set_tile_submap</a>&#160;&#160;&#160;<a class="el" href="sms_8h.html#a0cfd261bc7a94b1f6093f423bad30298">set_bkg_submap</a></td></tr>
<tr class="separator:adb5d0970167b81401113812773c90838"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b235c526c517fb02d20cdea780ee2c5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a3b235c526c517fb02d20cdea780ee2c5">set_tile_xy</a>&#160;&#160;&#160;<a class="el" href="nes_8h.html#a31655c4b138654e803e295bd4413759c">set_bkg_tile_xy</a></td></tr>
<tr class="separator:a3b235c526c517fb02d20cdea780ee2c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7a73323735000cf26196e073cbbdcbf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ad7a73323735000cf26196e073cbbdcbf">set_attribute_xy</a>&#160;&#160;&#160;<a class="el" href="nes_8h.html#a7cd23c81062d37753a4429b794907524">set_bkg_attribute_xy</a></td></tr>
<tr class="separator:ad7a73323735000cf26196e073cbbdcbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43b4f0ba65856deef626c0d9e7e41ed4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a43b4f0ba65856deef626c0d9e7e41ed4">set_sprite_2bpp_data</a>&#160;&#160;&#160;<a class="el" href="sms_8h.html#a216a3e3d320ee4d8cf4845600487ae39">set_sprite_data</a></td></tr>
<tr class="separator:a43b4f0ba65856deef626c0d9e7e41ed4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47607089a434dcda7a8583cfca03b604"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a47607089a434dcda7a8583cfca03b604">DISABLE_OAM_DMA</a>&#160;&#160;&#160;    <a class="el" href="sms_8h.html#a5435fd985412934e96a490e103c6bc49">_shadow_OAM_base</a> = 0</td></tr>
<tr class="separator:a47607089a434dcda7a8583cfca03b604"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abfd70bf31185a4900680977c9fb5a5ec"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#abfd70bf31185a4900680977c9fb5a5ec">DISABLE_VBL_TRANSFER</a>&#160;&#160;&#160;<a class="el" href="nes_8h.html#a47607089a434dcda7a8583cfca03b604">DISABLE_OAM_DMA</a></td></tr>
<tr class="separator:abfd70bf31185a4900680977c9fb5a5ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20895d53fe9caacb08ce8b071d57ce53"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a20895d53fe9caacb08ce8b071d57ce53">ENABLE_OAM_DMA</a>&#160;&#160;&#160;    <a class="el" href="sms_8h.html#a5435fd985412934e96a490e103c6bc49">_shadow_OAM_base</a> = (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)&amp;<a class="el" href="sms_8h.html#af02f9e73bd894cc25e03aedb0a10a91d">shadow_OAM</a> &gt;&gt; 8)</td></tr>
<tr class="separator:a20895d53fe9caacb08ce8b071d57ce53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77d516c9d3f86f100eddea5e0d133a76"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a77d516c9d3f86f100eddea5e0d133a76">ENABLE_VBL_TRANSFER</a>&#160;&#160;&#160;<a class="el" href="nes_8h.html#a20895d53fe9caacb08ce8b071d57ce53">ENABLE_OAM_DMA</a></td></tr>
<tr class="separator:a77d516c9d3f86f100eddea5e0d133a76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b77608c87a9aef65a03531482b2163b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a8b77608c87a9aef65a03531482b2163b">MAX_HARDWARE_SPRITES</a>&#160;&#160;&#160;40</td></tr>
<tr class="separator:a8b77608c87a9aef65a03531482b2163b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc296eacbda6a42f2a71aacab376ceb7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#afc296eacbda6a42f2a71aacab376ceb7">HARDWARE_SPRITE_CAN_FLIP_X</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:afc296eacbda6a42f2a71aacab376ceb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9119d69d971f6bee9e55d0df8f0ac983"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a9119d69d971f6bee9e55d0df8f0ac983">HARDWARE_SPRITE_CAN_FLIP_Y</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:a9119d69d971f6bee9e55d0df8f0ac983"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47865835d7d007d71b4bc8ae5cefb73a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a47865835d7d007d71b4bc8ae5cefb73a">fill_rect</a>&#160;&#160;&#160;<a class="el" href="nes_8h.html#a6879d813b6105ff8d9b36ec55c26a36e">fill_bkg_rect</a></td></tr>
<tr class="separator:a47865835d7d007d71b4bc8ae5cefb73a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a9508f919d9482d1d51534ccac212454d"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>) (void) <a class="el" href="asm_2types_8h.html#a7ed081d8dfb6902784b2fc730bbb7f96">NONBANKED</a></td></tr>
<tr class="separator:a9508f919d9482d1d51534ccac212454d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e5ea12b86bdfc812448c2f5c4336c03"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="struct_o_a_m__item__t.html">OAM_item_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a8e5ea12b86bdfc812448c2f5c4336c03">OAM_item_t</a></td></tr>
<tr class="separator:a8e5ea12b86bdfc812448c2f5c4336c03"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ac6b62210da8713ab1fca7cb3ff6e80c5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ac6b62210da8713ab1fca7cb3ff6e80c5">remove_VBL</a> (<a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>)</td></tr>
<tr class="separator:ac6b62210da8713ab1fca7cb3ff6e80c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67ef797ca230a941c1cc0c580720327b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a67ef797ca230a941c1cc0c580720327b">remove_LCD</a> (<a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>)</td></tr>
<tr class="separator:a67ef797ca230a941c1cc0c580720327b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a623f1ed8ee1d48bfa6e884d546991a6f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a623f1ed8ee1d48bfa6e884d546991a6f">remove_TIM</a> (<a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>)</td></tr>
<tr class="separator:a623f1ed8ee1d48bfa6e884d546991a6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a325751f7e2373601d2a7a94671deef29"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a325751f7e2373601d2a7a94671deef29">remove_SIO</a> (<a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>)</td></tr>
<tr class="separator:a325751f7e2373601d2a7a94671deef29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62770721f72bd8ad399a7bfcc0305db2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a62770721f72bd8ad399a7bfcc0305db2">remove_JOY</a> (<a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>)</td></tr>
<tr class="separator:a62770721f72bd8ad399a7bfcc0305db2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83bce4c8764eddefd9ab8af88669065e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a83bce4c8764eddefd9ab8af88669065e">add_VBL</a> (<a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>)</td></tr>
<tr class="separator:a83bce4c8764eddefd9ab8af88669065e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2dae907ea199eee9abb0eb4b831778f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ae2dae907ea199eee9abb0eb4b831778f">add_LCD</a> (<a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>)</td></tr>
<tr class="separator:ae2dae907ea199eee9abb0eb4b831778f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1b9d8d215e844834d2be5c10969d712"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aa1b9d8d215e844834d2be5c10969d712">add_TIM</a> (<a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>)</td></tr>
<tr class="separator:aa1b9d8d215e844834d2be5c10969d712"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a617176cc314371eeddcd8903584d62f0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a617176cc314371eeddcd8903584d62f0">add_low_priority_TIM</a> (<a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>)</td></tr>
<tr class="separator:a617176cc314371eeddcd8903584d62f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae655adc762bf0b4320d2e11d2e5fbc72"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ae655adc762bf0b4320d2e11d2e5fbc72">add_SIO</a> (<a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>)</td></tr>
<tr class="separator:ae655adc762bf0b4320d2e11d2e5fbc72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae370c3fa15b70edda4c26464d49129a8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ae370c3fa15b70edda4c26464d49129a8">add_JOY</a> (<a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>)</td></tr>
<tr class="separator:ae370c3fa15b70edda4c26464d49129a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e4afc51edff293a392211cb8d836591"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a4e4afc51edff293a392211cb8d836591">nowait_int_handler</a> (void)</td></tr>
<tr class="separator:a4e4afc51edff293a392211cb8d836591"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d670e24f1a48820fa2e612de3224234"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a4d670e24f1a48820fa2e612de3224234">wait_int_handler</a> (void)</td></tr>
<tr class="separator:a4d670e24f1a48820fa2e612de3224234"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade1cd2eab862b0e479415288964b3d63"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ade1cd2eab862b0e479415288964b3d63">cancel_pending_interrupts</a> (void)</td></tr>
<tr class="separator:ade1cd2eab862b0e479415288964b3d63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb0c344e6a417709af9497543f072aa3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#afb0c344e6a417709af9497543f072aa3">mode</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> m)</td></tr>
<tr class="separator:afb0c344e6a417709af9497543f072aa3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1bf03fa405248ec322b2a02d95975de"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aa1bf03fa405248ec322b2a02d95975de">get_mode</a> (void) <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:aa1bf03fa405248ec322b2a02d95975de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4093fb5f45f807fe8d4a45121f3fffc5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a4093fb5f45f807fe8d4a45121f3fffc5">get_system</a> (void)</td></tr>
<tr class="separator:a4093fb5f45f807fe8d4a45121f3fffc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1259cf3a23fd2166a9d1a2e93942e30e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a1259cf3a23fd2166a9d1a2e93942e30e">send_byte</a> (void)</td></tr>
<tr class="separator:a1259cf3a23fd2166a9d1a2e93942e30e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34d6500215984e8f9a986523a2f2dadd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a34d6500215984e8f9a986523a2f2dadd">receive_byte</a> (void)</td></tr>
<tr class="separator:a34d6500215984e8f9a986523a2f2dadd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79b9feff94d525e0237be22dcefd5850"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a79b9feff94d525e0237be22dcefd5850">delay</a> (<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> <a class="el" href="sms_8h.html#a0a3d95ad0ab8ad213016101d2e9c3d3e">d</a>) <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a></td></tr>
<tr class="separator:a79b9feff94d525e0237be22dcefd5850"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4344fefd260763e12703138066841b19"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a4344fefd260763e12703138066841b19">joypad</a> (void) <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a4344fefd260763e12703138066841b19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb680388b5bcbf0c69526d7017ffe8d2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#abb680388b5bcbf0c69526d7017ffe8d2">waitpad</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> mask) <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:abb680388b5bcbf0c69526d7017ffe8d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada353868815f4a2923812ac63aa00003"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ada353868815f4a2923812ac63aa00003">waitpadup</a> (void) <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(a</td></tr>
<tr class="separator:ada353868815f4a2923812ac63aa00003"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7e35e1eff44ed78ad8f0015c6e85b4e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ab7e35e1eff44ed78ad8f0015c6e85b4e">joypad_init</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> npads, <a class="el" href="structjoypads__t.html">joypads_t</a> *joypads) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
<tr class="separator:ab7e35e1eff44ed78ad8f0015c6e85b4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6634cc802b70972dc0ce0961ffc9693"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ab6634cc802b70972dc0ce0961ffc9693">joypad_ex</a> (<a class="el" href="structjoypads__t.html">joypads_t</a> *joypads) <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:ab6634cc802b70972dc0ce0961ffc9693"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad3a9797fd6d216671b5bbaccd8a4916"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aad3a9797fd6d216671b5bbaccd8a4916">enable_interrupts</a> (void) <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(a</td></tr>
<tr class="separator:aad3a9797fd6d216671b5bbaccd8a4916"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3e53d15b4fc64f43761f55c1793b490"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ae3e53d15b4fc64f43761f55c1793b490">disable_interrupts</a> (void) <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(a</td></tr>
<tr class="separator:ae3e53d15b4fc64f43761f55c1793b490"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6bc65c789195b4c19ee8765b1a2aa28"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ae6bc65c789195b4c19ee8765b1a2aa28">set_interrupts</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> flags) <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:ae6bc65c789195b4c19ee8765b1a2aa28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3aea9deb2a0bfea9ff05a898f4822e31"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a3aea9deb2a0bfea9ff05a898f4822e31">reset</a> (void)</td></tr>
<tr class="separator:a3aea9deb2a0bfea9ff05a898f4822e31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af57b77452ef377da18e4fbf0288013d1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#af57b77452ef377da18e4fbf0288013d1">vsync</a> (void) <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:af57b77452ef377da18e4fbf0288013d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a815f8ecad32d14b786a8ed1168518773"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a815f8ecad32d14b786a8ed1168518773">wait_vbl_done</a> (void) <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a815f8ecad32d14b786a8ed1168518773"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae96812c15f9003428180ec3d0964145"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aae96812c15f9003428180ec3d0964145">display_off</a> (void) <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:aae96812c15f9003428180ec3d0964145"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ae1f52fbe4d2c2657e3d1fccc0d543c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a1ae1f52fbe4d2c2657e3d1fccc0d543c">refresh_OAM</a> (void) <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a1ae1f52fbe4d2c2657e3d1fccc0d543c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97b9f2fc6ac7cae97656aca940d65d44"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a97b9f2fc6ac7cae97656aca940d65d44">hiramcpy</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> dst, const void *src, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> n) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a97b9f2fc6ac7cae97656aca940d65d44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a26d723b07d1a9893f57208a201df36"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a2a26d723b07d1a9893f57208a201df36">set_vram_byte</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *addr, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> v) <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a2a26d723b07d1a9893f57208a201df36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae32250cfb4daaa1fff7250a0e3f0ad0f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ae32250cfb4daaa1fff7250a0e3f0ad0f">get_vram_byte</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *addr) <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:ae32250cfb4daaa1fff7250a0e3f0ad0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9005b80d3315f50f0fb0e1728e7ee60f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a9005b80d3315f50f0fb0e1728e7ee60f">get_bkg_xy_addr</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a9005b80d3315f50f0fb0e1728e7ee60f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa224c9bac27c7fd268e62bdf33338a84"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aa224c9bac27c7fd268e62bdf33338a84">set_2bpp_palette</a> (<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> palette)</td></tr>
<tr class="separator:aa224c9bac27c7fd268e62bdf33338a84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f00bd35cd56aac84c108f5a802c3f9c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a1f00bd35cd56aac84c108f5a802c3f9c">set_1bpp_colors_ex</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> fgcolor, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> bgcolor, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#a3ea524204d839377cf39842eec23e202">mode</a>) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
<tr class="separator:a1f00bd35cd56aac84c108f5a802c3f9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcb394299a1033616fc7d2faec8bd6ad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#adcb394299a1033616fc7d2faec8bd6ad">set_1bpp_colors</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> fgcolor, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> bgcolor)</td></tr>
<tr class="separator:adcb394299a1033616fc7d2faec8bd6ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f5101f2b7bb0123c26a3e257f843626"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a1f5101f2b7bb0123c26a3e257f843626">set_bkg_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a1f5101f2b7bb0123c26a3e257f843626"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a711fa26feecc76dc51482b0f77062859"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a711fa26feecc76dc51482b0f77062859">set_bkg_1bpp_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a711fa26feecc76dc51482b0f77062859"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c13238dfec416439d75b133a272e6df"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a5c13238dfec416439d75b133a272e6df">get_bkg_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a5c13238dfec416439d75b133a272e6df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6da9e2fa1bafd35363e84ee999909ec7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a6da9e2fa1bafd35363e84ee999909ec7">set_bkg_tiles</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *tiles) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a6da9e2fa1bafd35363e84ee999909ec7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a811c386cac0df2d260aacb5a43608be5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a811c386cac0df2d260aacb5a43608be5">set_bkg_based_tiles</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *tiles, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile)</td></tr>
<tr class="separator:a811c386cac0df2d260aacb5a43608be5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0bcf384938628c4ab52e63b2df8f78f8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a0bcf384938628c4ab52e63b2df8f78f8">set_bkg_attributes</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *tiles)</td></tr>
<tr class="separator:a0bcf384938628c4ab52e63b2df8f78f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb21d1c7d533a7133bab36a845489780"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#adb21d1c7d533a7133bab36a845489780">set_bkg_submap</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *map, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> map_w) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
<tr class="separator:adb21d1c7d533a7133bab36a845489780"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc8bc5808620a9717263b8c9ec2237f0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#abc8bc5808620a9717263b8c9ec2237f0">set_bkg_based_submap</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *map, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> map_w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile)</td></tr>
<tr class="separator:abc8bc5808620a9717263b8c9ec2237f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1cefe143b3861632897e0c989401bce7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a1cefe143b3861632897e0c989401bce7">set_bkg_submap_attributes</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *map, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> map_w)</td></tr>
<tr class="separator:a1cefe143b3861632897e0c989401bce7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6bcf24d97f93307b30f2906251f39a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aa6bcf24d97f93307b30f2906251f39a0">get_bkg_tiles</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *tiles) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:aa6bcf24d97f93307b30f2906251f39a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaad2823459f54a08a18be59d4c3d63d8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aaad2823459f54a08a18be59d4c3d63d8">set_bkg_tile_xy</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> t)</td></tr>
<tr class="separator:aaad2823459f54a08a18be59d4c3d63d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3dcce95daec5b42fc14a8938ef2cf503"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a3dcce95daec5b42fc14a8938ef2cf503">set_bkg_attribute_xy</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> a)</td></tr>
<tr class="separator:a3dcce95daec5b42fc14a8938ef2cf503"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55c6581dbe9300dc6df41730f090af51"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a55c6581dbe9300dc6df41730f090af51">get_bkg_tile_xy</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a55c6581dbe9300dc6df41730f090af51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6261537edc74068e3f7f057e6a3e8a57"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a6261537edc74068e3f7f057e6a3e8a57">move_bkg</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y)</td></tr>
<tr class="separator:a6261537edc74068e3f7f057e6a3e8a57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f583f7a880daa6145ca78b086a209d1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a1f583f7a880daa6145ca78b086a209d1">scroll_bkg</a> (<a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a> x, <a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a> y)</td></tr>
<tr class="separator:a1f583f7a880daa6145ca78b086a209d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8213cfad631865e3b6faec18e772cb4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aa8213cfad631865e3b6faec18e772cb4">get_win_xy_addr</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:aa8213cfad631865e3b6faec18e772cb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2bf0c4919c30d322fa5853c896e710f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ac2bf0c4919c30d322fa5853c896e710f">set_win_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:ac2bf0c4919c30d322fa5853c896e710f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd5ee7a94059e6edbe9223f291bc2b46"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#acd5ee7a94059e6edbe9223f291bc2b46">set_win_1bpp_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:acd5ee7a94059e6edbe9223f291bc2b46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ef32e7c1669aba48f235500a495baba"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a7ef32e7c1669aba48f235500a495baba">get_win_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a7ef32e7c1669aba48f235500a495baba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c59b4ee6323af9832998906d087266b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a5c59b4ee6323af9832998906d087266b">set_win_tiles</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *tiles) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a5c59b4ee6323af9832998906d087266b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a739a212609ae60c9c56c095f96b4ea80"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a739a212609ae60c9c56c095f96b4ea80">set_win_based_tiles</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *tiles, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile)</td></tr>
<tr class="separator:a739a212609ae60c9c56c095f96b4ea80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af80befa3cad9cae361c7cf4fffb3a8de"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#af80befa3cad9cae361c7cf4fffb3a8de">set_win_submap</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *map, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> map_w) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
<tr class="separator:af80befa3cad9cae361c7cf4fffb3a8de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b8a1026983cb2b2c0bd46334b4692a0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a1b8a1026983cb2b2c0bd46334b4692a0">set_win_based_submap</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *map, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> map_w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile)</td></tr>
<tr class="separator:a1b8a1026983cb2b2c0bd46334b4692a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a469de4c6640f921254b336b5a6191a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a8a469de4c6640f921254b336b5a6191a">get_win_tiles</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *tiles) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a8a469de4c6640f921254b336b5a6191a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac46f5cb1264dc3948c6e339859f5106c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ac46f5cb1264dc3948c6e339859f5106c">set_win_tile_xy</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> t)</td></tr>
<tr class="separator:ac46f5cb1264dc3948c6e339859f5106c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e29fdca81c28c627c2591029722e71c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a2e29fdca81c28c627c2591029722e71c">get_win_tile_xy</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a2e29fdca81c28c627c2591029722e71c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeef17768c494bcd6b67f7591329f7ff5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aeef17768c494bcd6b67f7591329f7ff5">move_win</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y)</td></tr>
<tr class="separator:aeef17768c494bcd6b67f7591329f7ff5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12c2b5ac249d01caf1561cbbf3962044"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a12c2b5ac249d01caf1561cbbf3962044">scroll_win</a> (<a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a> x, <a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a> y)</td></tr>
<tr class="separator:a12c2b5ac249d01caf1561cbbf3962044"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae45b1c639698951b47e44fa8e89556f2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ae45b1c639698951b47e44fa8e89556f2">set_sprite_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:ae45b1c639698951b47e44fa8e89556f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3e60c92c9f8fbed855f8712187ea3ea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ab3e60c92c9f8fbed855f8712187ea3ea">set_sprite_1bpp_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:ab3e60c92c9f8fbed855f8712187ea3ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcdec4034a14abc5be9bb88c29b947c9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#adcdec4034a14abc5be9bb88c29b947c9">get_sprite_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:adcdec4034a14abc5be9bb88c29b947c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e0cdfd6b9a2ae1b7f30384f132d8687"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a7e0cdfd6b9a2ae1b7f30384f132d8687">SET_SHADOW_OAM_ADDRESS</a> (void *address)</td></tr>
<tr class="separator:a7e0cdfd6b9a2ae1b7f30384f132d8687"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05bf0b9f1328de7b568a19a2a428bcfe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a05bf0b9f1328de7b568a19a2a428bcfe">set_sprite_tile</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> tile)</td></tr>
<tr class="separator:a05bf0b9f1328de7b568a19a2a428bcfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5c0beff7d7a7d8641b51fd95c811b2a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#af5c0beff7d7a7d8641b51fd95c811b2a">get_sprite_tile</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb)</td></tr>
<tr class="separator:af5c0beff7d7a7d8641b51fd95c811b2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99ea3252469e3614e977cce2aa1d06f7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a99ea3252469e3614e977cce2aa1d06f7">set_sprite_prop</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> prop)</td></tr>
<tr class="separator:a99ea3252469e3614e977cce2aa1d06f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b873c807c9e2c90fb574951e85fdf88"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a6b873c807c9e2c90fb574951e85fdf88">get_sprite_prop</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb)</td></tr>
<tr class="separator:a6b873c807c9e2c90fb574951e85fdf88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab42c12c1d9aed3fd963248fbea9830cd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ab42c12c1d9aed3fd963248fbea9830cd">move_sprite</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y)</td></tr>
<tr class="separator:ab42c12c1d9aed3fd963248fbea9830cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c59aa9a4f9ea42bed6ca6940b2741fe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a6c59aa9a4f9ea42bed6ca6940b2741fe">scroll_sprite</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb, <a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a> x, <a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a> y)</td></tr>
<tr class="separator:a6c59aa9a4f9ea42bed6ca6940b2741fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad22c51635d052399bbbe1777999c794d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ad22c51635d052399bbbe1777999c794d">hide_sprite</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb)</td></tr>
<tr class="separator:ad22c51635d052399bbbe1777999c794d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6148e40610bc542991df842c6b19e4c9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a6148e40610bc542991df842c6b19e4c9">set_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *vram_addr, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, <a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> len)</td></tr>
<tr class="separator:a6148e40610bc542991df842c6b19e4c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77d34577e9f97ffaf8463c752115722b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a77d34577e9f97ffaf8463c752115722b">get_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *vram_addr, <a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> len)</td></tr>
<tr class="separator:a77d34577e9f97ffaf8463c752115722b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2dd9f335a197647264f01a713bd31a70"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a2dd9f335a197647264f01a713bd31a70">vmemcpy</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *dest, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *sour, <a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> len)</td></tr>
<tr class="separator:a2dd9f335a197647264f01a713bd31a70"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6224b2e4b72c062a2bb2959b0aaf860a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a6224b2e4b72c062a2bb2959b0aaf860a">set_tiles</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *vram_addr, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *tiles) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
<tr class="separator:a6224b2e4b72c062a2bb2959b0aaf860a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe4846d4570b4880b0e54b9e503f4d30"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#abe4846d4570b4880b0e54b9e503f4d30">set_tile_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:abe4846d4570b4880b0e54b9e503f4d30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9830fb188433cb0305c2cefb8f8ab11"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#af9830fb188433cb0305c2cefb8f8ab11">get_tiles</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *vram_addr, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *tiles) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
<tr class="separator:af9830fb188433cb0305c2cefb8f8ab11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68651e50243349b48164a8ad983dca4e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a68651e50243349b48164a8ad983dca4e">set_native_tile_data</a> (<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data)</td></tr>
<tr class="separator:a68651e50243349b48164a8ad983dca4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb5c235def5988696724051c5f838e74"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#acb5c235def5988696724051c5f838e74">set_bkg_native_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data)</td></tr>
<tr class="separator:acb5c235def5988696724051c5f838e74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9e3edd5311290cba933c382cf2f5898"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aa9e3edd5311290cba933c382cf2f5898">set_sprite_native_data</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_tile, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_tiles, const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data)</td></tr>
<tr class="separator:aa9e3edd5311290cba933c382cf2f5898"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6ac67037de041eb0141ba3725b1db83"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#af6ac67037de041eb0141ba3725b1db83">init_win</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#a0b3366755f3276b0243c1e0497471b7a">c</a>) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:af6ac67037de041eb0141ba3725b1db83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46058204097dd305bf72bc20ea7f7a3b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a46058204097dd305bf72bc20ea7f7a3b">init_bkg</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#a0b3366755f3276b0243c1e0497471b7a">c</a>) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a46058204097dd305bf72bc20ea7f7a3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97bab71effd5e4e386629cb6ca5816cf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a97bab71effd5e4e386629cb6ca5816cf">vmemset</a> (void *s, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#a0b3366755f3276b0243c1e0497471b7a">c</a>, <a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a> n) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a97bab71effd5e4e386629cb6ca5816cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a74c3f53fca019f7abcd1270650808849"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a74c3f53fca019f7abcd1270650808849">fill_bkg_rect</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> tile) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a74c3f53fca019f7abcd1270650808849"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5bc3dc922707507aa51ed7f5b4a21e3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ad5bc3dc922707507aa51ed7f5b4a21e3">fill_win_rect</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> w, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="el" href="sms_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a>, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> tile) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a> <a class="el" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:ad5bc3dc922707507aa51ed7f5b4a21e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a0b3366755f3276b0243c1e0497471b7a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a0b3366755f3276b0243c1e0497471b7a">c</a></td></tr>
<tr class="separator:a0b3366755f3276b0243c1e0497471b7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a3d95ad0ab8ad213016101d2e9c3d3e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a0a3d95ad0ab8ad213016101d2e9c3d3e">d</a></td></tr>
<tr class="separator:a0a3d95ad0ab8ad213016101d2e9c3d3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeda4515a31485c9688c4601ac5ce2d79"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aeda4515a31485c9688c4601ac5ce2d79">e</a></td></tr>
<tr class="separator:aeda4515a31485c9688c4601ac5ce2d79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba4fa6f13f80e53daeb0caa7b1ec8afb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aba4fa6f13f80e53daeb0caa7b1ec8afb">h</a></td></tr>
<tr class="separator:aba4fa6f13f80e53daeb0caa7b1ec8afb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af79b920bcb642bba2e652874c4f7eeff"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#af79b920bcb642bba2e652874c4f7eeff">l</a></td></tr>
<tr class="separator:af79b920bcb642bba2e652874c4f7eeff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a874b9bd95b0a05d6a6072feabc879e45"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a874b9bd95b0a05d6a6072feabc879e45">_cpu</a></td></tr>
<tr class="separator:a874b9bd95b0a05d6a6072feabc879e45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a539b7b45b1c2d6b2051553665c76fd36"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a539b7b45b1c2d6b2051553665c76fd36">_is_GBA</a></td></tr>
<tr class="separator:a539b7b45b1c2d6b2051553665c76fd36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78d2fd18666afec116f176d46debb4e7"><td class="memItemLeft" align="right" valign="top">volatile <a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a78d2fd18666afec116f176d46debb4e7">sys_time</a></td></tr>
<tr class="separator:a78d2fd18666afec116f176d46debb4e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afcd1b4a4ad7bab85d0adec8c69d5bec0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nes_2hardware_8h.html#afa5336aa76cfcbe00fc5dab15549bc23">__REG</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#afcd1b4a4ad7bab85d0adec8c69d5bec0">_vbl_done</a></td></tr>
<tr class="separator:afcd1b4a4ad7bab85d0adec8c69d5bec0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e3415ce2f7fb63427618bd9b9cb6635"><td class="memItemLeft" align="right" valign="top">volatile <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a2e3415ce2f7fb63427618bd9b9cb6635">_io_status</a></td></tr>
<tr class="separator:a2e3415ce2f7fb63427618bd9b9cb6635"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02f3a1585ae654444e628c1aa98ef0cf"><td class="memItemLeft" align="right" valign="top">volatile <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a02f3a1585ae654444e628c1aa98ef0cf">_io_in</a></td></tr>
<tr class="separator:a02f3a1585ae654444e628c1aa98ef0cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acae13736da20f9fc53e8d38934aa2119"><td class="memItemLeft" align="right" valign="top">volatile <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#acae13736da20f9fc53e8d38934aa2119">_io_out</a></td></tr>
<tr class="separator:acae13736da20f9fc53e8d38934aa2119"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98b848953a95ce2fff6fda643575d74a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nes_2hardware_8h.html#afa5336aa76cfcbe00fc5dab15549bc23">__REG</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a98b848953a95ce2fff6fda643575d74a">_current_bank</a></td></tr>
<tr class="separator:a98b848953a95ce2fff6fda643575d74a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c2e4adef74067fdbb49005bc73de937"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td></tr>
<tr class="separator:a4c2e4adef74067fdbb49005bc73de937"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a250f5339e05523912926be566e9eb8c0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a250f5339e05523912926be566e9eb8c0">_current_1bpp_colors</a></td></tr>
<tr class="separator:a250f5339e05523912926be566e9eb8c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa82205e9629f984d0b3dc8055c211522"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#aa82205e9629f984d0b3dc8055c211522">_map_tile_offset</a></td></tr>
<tr class="separator:aa82205e9629f984d0b3dc8055c211522"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab472d9bbb1bcfd141374f5babc71934c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#ab472d9bbb1bcfd141374f5babc71934c">_submap_tile_offset</a></td></tr>
<tr class="separator:ab472d9bbb1bcfd141374f5babc71934c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3619f9cb1e3c92238a033ead79a0c551"><td class="memItemLeft" align="right" valign="top">volatile struct <a class="el" href="struct_o_a_m__item__t.html">OAM_item_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a3619f9cb1e3c92238a033ead79a0c551">shadow_OAM</a> []</td></tr>
<tr class="separator:a3619f9cb1e3c92238a033ead79a0c551"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b662ae4d83f9837bacb9fd580673054"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nes_2hardware_8h.html#afa5336aa76cfcbe00fc5dab15549bc23">__REG</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gb_8h.html#a7b662ae4d83f9837bacb9fd580673054">_shadow_OAM_base</a></td></tr>
<tr class="separator:a7b662ae4d83f9837bacb9fd580673054"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Gameboy specific functions. </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a385397587c93683e8e11afb712e2960b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a385397587c93683e8e11afb712e2960b">&#9670;&nbsp;</a></span>NINTENDO</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NINTENDO</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a99bca2df4c6fde16a659797b4e584036"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a99bca2df4c6fde16a659797b4e584036">&#9670;&nbsp;</a></span>SYSTEM_60HZ</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SYSTEM_60HZ&#160;&#160;&#160;0x00</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ad6329c19927cf02579e2503e40c0bbde"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad6329c19927cf02579e2503e40c0bbde">&#9670;&nbsp;</a></span>SYSTEM_50HZ</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SYSTEM_50HZ&#160;&#160;&#160;0x01</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="af10046e88cba47031142a763a94210df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af10046e88cba47031142a763a94210df">&#9670;&nbsp;</a></span>GAMEBOY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define GAMEBOY</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a05ca817ab32f6da612c3ae26db5abf02"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05ca817ab32f6da612c3ae26db5abf02">&#9670;&nbsp;</a></span>J_UP</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define J_UP&#160;&#160;&#160;0x04U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Joypad bits. A logical OR of these is used in the wait_pad and joypad functions. For example, to see if the B button is pressed try</p>
<p>uint8_t keys; keys = <a class="el" href="gb_8h.html#a4344fefd260763e12703138066841b19">joypad()</a>; if (keys &amp; J_B) { ... }</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a4344fefd260763e12703138066841b19">joypad</a> </dd></dl>

</div>
</div>
<a id="ae032c5c544196e37ec0432f6cfad7904"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae032c5c544196e37ec0432f6cfad7904">&#9670;&nbsp;</a></span>J_DOWN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define J_DOWN&#160;&#160;&#160;0x08U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ac70894fecac30c1ca9917f07373cf81c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac70894fecac30c1ca9917f07373cf81c">&#9670;&nbsp;</a></span>J_LEFT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define J_LEFT&#160;&#160;&#160;0x02U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a3bad91d11ae09ffcbb3cb0a81873d325"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3bad91d11ae09ffcbb3cb0a81873d325">&#9670;&nbsp;</a></span>J_RIGHT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define J_RIGHT&#160;&#160;&#160;0x01U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a31af766e3b598eb7a6b63f55a4988e7a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31af766e3b598eb7a6b63f55a4988e7a">&#9670;&nbsp;</a></span>J_A</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define J_A&#160;&#160;&#160;0x10U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ae47e59a309120f9420993f26816b5e6d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae47e59a309120f9420993f26816b5e6d">&#9670;&nbsp;</a></span>J_B</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define J_B&#160;&#160;&#160;0x20U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ab416a9d96d1582490828f4bac78a8b5b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab416a9d96d1582490828f4bac78a8b5b">&#9670;&nbsp;</a></span>J_SELECT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define J_SELECT&#160;&#160;&#160;0x40U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ab769c6e20778298be8bc3321476ceb53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab769c6e20778298be8bc3321476ceb53">&#9670;&nbsp;</a></span>J_START</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define J_START&#160;&#160;&#160;0x80U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="acc9798fc62b5d626c91c8b0f20b522ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc9798fc62b5d626c91c8b0f20b522ff">&#9670;&nbsp;</a></span>M_DRAWING</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_DRAWING&#160;&#160;&#160;0x01U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Screen modes. Normally used by internal functions only. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#afb0c344e6a417709af9497543f072aa3">mode()</a> </dd></dl>

</div>
</div>
<a id="af0e30d6af308ffe5a025fbe85da40f6f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af0e30d6af308ffe5a025fbe85da40f6f">&#9670;&nbsp;</a></span>M_TEXT_OUT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_TEXT_OUT&#160;&#160;&#160;0x02U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a908826e7180f94a5988ceb8633313a2e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a908826e7180f94a5988ceb8633313a2e">&#9670;&nbsp;</a></span>M_TEXT_INOUT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_TEXT_INOUT&#160;&#160;&#160;0x03U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a04382de20738146fe873ddfb0585052b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a04382de20738146fe873ddfb0585052b">&#9670;&nbsp;</a></span>M_NO_SCROLL</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_NO_SCROLL&#160;&#160;&#160;0x04U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set this in addition to the others to disable scrolling</p>
<p>If scrolling is disabled, the cursor returns to (0,0) </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#afb0c344e6a417709af9497543f072aa3">mode()</a> </dd></dl>

</div>
</div>
<a id="aca2855edd2d28f66be551a0f7ec23f07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aca2855edd2d28f66be551a0f7ec23f07">&#9670;&nbsp;</a></span>M_NO_INTERP</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define M_NO_INTERP&#160;&#160;&#160;0x08U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set this to disable interpretation </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#afb0c344e6a417709af9497543f072aa3">mode()</a> </dd></dl>

</div>
</div>
<a id="a33caf10f6d1a7cbb6bd07b899c1a545f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33caf10f6d1a7cbb6bd07b899c1a545f">&#9670;&nbsp;</a></span>S_BANK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define S_BANK&#160;&#160;&#160;0x08U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If this bit set clear, the tile from the second VRAM bank is used </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a99ea3252469e3614e977cce2aa1d06f7">set_sprite_prop()</a> </dd></dl>

</div>
</div>
<a id="a54572cf6791463b6d60623837e0bb5a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a54572cf6791463b6d60623837e0bb5a6">&#9670;&nbsp;</a></span>S_PALETTE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define S_PALETTE&#160;&#160;&#160;0x10U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If this is set, sprite colours come from OBJ1PAL. Else they come from OBJ0PAL </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a99ea3252469e3614e977cce2aa1d06f7">set_sprite_prop()</a>. </dd></dl>

</div>
</div>
<a id="ae97793b4039609f93b0f7f8bddb18011"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae97793b4039609f93b0f7f8bddb18011">&#9670;&nbsp;</a></span>S_FLIPX</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define S_FLIPX&#160;&#160;&#160;0x20U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If set the sprite will be flipped horizontally. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a99ea3252469e3614e977cce2aa1d06f7">set_sprite_prop()</a> </dd></dl>

</div>
</div>
<a id="a4bbb9cd6c38b2317de5256d1d889c63b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4bbb9cd6c38b2317de5256d1d889c63b">&#9670;&nbsp;</a></span>S_FLIPY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define S_FLIPY&#160;&#160;&#160;0x40U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If set the sprite will be flipped vertically. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a99ea3252469e3614e977cce2aa1d06f7">set_sprite_prop()</a> </dd></dl>

</div>
</div>
<a id="a9506d04c2ec7d2442a52054f67d2b32f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9506d04c2ec7d2442a52054f67d2b32f">&#9670;&nbsp;</a></span>S_PRIORITY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define S_PRIORITY&#160;&#160;&#160;0x80U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If this bit is clear, then the sprite will be displayed on top of the background and window. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a99ea3252469e3614e977cce2aa1d06f7">set_sprite_prop()</a> </dd></dl>

</div>
</div>
<a id="a826169925ff12d52f0a0d51f14d2936b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a826169925ff12d52f0a0d51f14d2936b">&#9670;&nbsp;</a></span>S_PAL</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define S_PAL</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">n</td><td>)</td>
          <td>&#160;&#160;&#160;n</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Defines how palette number is encoded in OAM. Required for the png2asset tool's metasprite output. </p>

</div>
</div>
<a id="aa027abe630d44039f238034bcb2d2f36"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa027abe630d44039f238034bcb2d2f36">&#9670;&nbsp;</a></span>EMPTY_IFLAG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define EMPTY_IFLAG&#160;&#160;&#160;0x00U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Disable calling of interrupt service routines </p>

</div>
</div>
<a id="a2ca7720b9a5da9b2173e1f74dba85541"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ca7720b9a5da9b2173e1f74dba85541">&#9670;&nbsp;</a></span>VBL_IFLAG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define VBL_IFLAG&#160;&#160;&#160;0x01U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>VBlank Interrupt occurs at the start of the vertical blank.</p>
<p>During this period the video ram may be freely accessed. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ae6bc65c789195b4c19ee8765b1a2aa28">set_interrupts()</a>, </dd>
<dd>
<a class="el" href="gb_8h.html#a83bce4c8764eddefd9ab8af88669065e">add_VBL</a> </dd></dl>

</div>
</div>
<a id="a61a9e2910380de6abb34df14ef634eb4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a61a9e2910380de6abb34df14ef634eb4">&#9670;&nbsp;</a></span>LCD_IFLAG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LCD_IFLAG&#160;&#160;&#160;0x02U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>LCD Interrupt when triggered by the STAT register. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ae6bc65c789195b4c19ee8765b1a2aa28">set_interrupts()</a>, </dd>
<dd>
<a class="el" href="gb_8h.html#ae2dae907ea199eee9abb0eb4b831778f">add_LCD</a> </dd></dl>

</div>
</div>
<a id="a604256210ec5b90b68185e1a18efab49"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a604256210ec5b90b68185e1a18efab49">&#9670;&nbsp;</a></span>TIM_IFLAG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TIM_IFLAG&#160;&#160;&#160;0x04U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Timer Interrupt when the timer <a class="el" href="sms_2hardware_8h.html#a4741a62d05deefc649df160baca326dd">TIMA_REG</a> overflows. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ae6bc65c789195b4c19ee8765b1a2aa28">set_interrupts()</a>, </dd>
<dd>
<a class="el" href="gb_8h.html#aa1b9d8d215e844834d2be5c10969d712">add_TIM</a> </dd></dl>

</div>
</div>
<a id="ad90564458646c5646b3880b93db3443e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad90564458646c5646b3880b93db3443e">&#9670;&nbsp;</a></span>SIO_IFLAG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SIO_IFLAG&#160;&#160;&#160;0x08U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Serial Link Interrupt occurs when the serial transfer has completed. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ae6bc65c789195b4c19ee8765b1a2aa28">set_interrupts()</a>, </dd>
<dd>
<a class="el" href="gb_8h.html#ae655adc762bf0b4320d2e11d2e5fbc72">add_SIO</a> </dd></dl>

</div>
</div>
<a id="a2f829cf27d6e3e24c875e9b82dfcb280"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f829cf27d6e3e24c875e9b82dfcb280">&#9670;&nbsp;</a></span>JOY_IFLAG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define JOY_IFLAG&#160;&#160;&#160;0x10U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Joypad Interrupt occurs on a transition of the keypad. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ae6bc65c789195b4c19ee8765b1a2aa28">set_interrupts()</a>, </dd>
<dd>
<a class="el" href="gb_8h.html#ae370c3fa15b70edda4c26464d49129a8">add_JOY</a> </dd></dl>

</div>
</div>
<a id="ab311e53739c992294ae07ca506a924ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab311e53739c992294ae07ca506a924ad">&#9670;&nbsp;</a></span>DMG_BLACK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DMG_BLACK&#160;&#160;&#160;0x03</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a45d13a674e169dd83df7e1f46513ccba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45d13a674e169dd83df7e1f46513ccba">&#9670;&nbsp;</a></span>DMG_DARK_GRAY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DMG_DARK_GRAY&#160;&#160;&#160;0x02</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a8ccd6732d3bdf390cc0943e8567341f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ccd6732d3bdf390cc0943e8567341f3">&#9670;&nbsp;</a></span>DMG_LITE_GRAY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DMG_LITE_GRAY&#160;&#160;&#160;0x01</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a11cedc2ee58acfbbfc48dfb2b9a551b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a11cedc2ee58acfbbfc48dfb2b9a551b3">&#9670;&nbsp;</a></span>DMG_WHITE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DMG_WHITE&#160;&#160;&#160;0x00</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a9727caafc483ba6ec65e9344b033d684"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9727caafc483ba6ec65e9344b033d684">&#9670;&nbsp;</a></span>DMG_PALETTE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DMG_PALETTE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">C0, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">C1, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">C2, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">C3&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;((<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)((((C3) &amp; 0x03) &lt;&lt; 6) | (((C2) &amp; 0x03) &lt;&lt; 4) | (((C1) &amp; 0x03) &lt;&lt; 2) | ((C0) &amp; 0x03)))</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Macro to create a DMG palette from 4 colors</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C0</td><td>Color for Index 0 </td></tr>
    <tr><td class="paramname">C1</td><td>Color for Index 1 </td></tr>
    <tr><td class="paramname">C2</td><td>Color for Index 2 </td></tr>
    <tr><td class="paramname">C3</td><td>Color for Index 3</td></tr>
  </table>
  </dd>
</dl>
<p>The resulting format is four greyscale colors packed into a single unsigned byte.</p>
<p>Example: </p><div class="fragment"><div class="line"><a class="code" href="gb_2hardware_8h.html#af577ba87ec3d13d7415e4c4a53cdf997">BGP_REG</a> = <a class="code" href="gb_8h.html#a9727caafc483ba6ec65e9344b033d684">DMG_PALETTE</a>(<a class="code" href="gb_8h.html#ab311e53739c992294ae07ca506a924ad">DMG_BLACK</a>, <a class="code" href="gb_8h.html#a45d13a674e169dd83df7e1f46513ccba">DMG_DARK_GRAY</a>, <a class="code" href="gb_8h.html#a8ccd6732d3bdf390cc0943e8567341f3">DMG_LITE_GRAY</a>, <a class="code" href="gb_8h.html#a11cedc2ee58acfbbfc48dfb2b9a551b3">DMG_WHITE</a>);</div>
<div class="ttc" id="agb_2hardware_8h_html_af577ba87ec3d13d7415e4c4a53cdf997"><div class="ttname"><a href="gb_2hardware_8h.html#af577ba87ec3d13d7415e4c4a53cdf997">BGP_REG</a></div><div class="ttdeci">__REG BGP_REG</div><div class="ttdef"><b>Definition:</b> hardware.h:315</div></div>
<div class="ttc" id="agb_8h_html_a11cedc2ee58acfbbfc48dfb2b9a551b3"><div class="ttname"><a href="gb_8h.html#a11cedc2ee58acfbbfc48dfb2b9a551b3">DMG_WHITE</a></div><div class="ttdeci">#define DMG_WHITE</div><div class="ttdef"><b>Definition:</b> gb.h:139</div></div>
<div class="ttc" id="agb_8h_html_a45d13a674e169dd83df7e1f46513ccba"><div class="ttname"><a href="gb_8h.html#a45d13a674e169dd83df7e1f46513ccba">DMG_DARK_GRAY</a></div><div class="ttdeci">#define DMG_DARK_GRAY</div><div class="ttdef"><b>Definition:</b> gb.h:137</div></div>
<div class="ttc" id="agb_8h_html_a8ccd6732d3bdf390cc0943e8567341f3"><div class="ttname"><a href="gb_8h.html#a8ccd6732d3bdf390cc0943e8567341f3">DMG_LITE_GRAY</a></div><div class="ttdeci">#define DMG_LITE_GRAY</div><div class="ttdef"><b>Definition:</b> gb.h:138</div></div>
<div class="ttc" id="agb_8h_html_a9727caafc483ba6ec65e9344b033d684"><div class="ttname"><a href="gb_8h.html#a9727caafc483ba6ec65e9344b033d684">DMG_PALETTE</a></div><div class="ttdeci">#define DMG_PALETTE(C0, C1, C2, C3)</div><div class="ttdef"><b>Definition:</b> gb.h:159</div></div>
<div class="ttc" id="agb_8h_html_ab311e53739c992294ae07ca506a924ad"><div class="ttname"><a href="gb_8h.html#ab311e53739c992294ae07ca506a924ad">DMG_BLACK</a></div><div class="ttdeci">#define DMG_BLACK</div><div class="ttdef"><b>Definition:</b> gb.h:136</div></div>
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_2hardware_8h.html#a13f3e89f7b92258d825292e5058815c7">OBP0_REG</a>, <a class="el" href="gb_2hardware_8h.html#a9da545164e049ef773128f869daece13">OBP1_REG</a>, <a class="el" href="gb_2hardware_8h.html#af577ba87ec3d13d7415e4c4a53cdf997">BGP_REG</a> </dd>
<dd>
<a class="el" href="gb_8h.html#ab311e53739c992294ae07ca506a924ad">DMG_BLACK</a>, <a class="el" href="gb_8h.html#a45d13a674e169dd83df7e1f46513ccba">DMG_DARK_GRAY</a>, <a class="el" href="gb_8h.html#a8ccd6732d3bdf390cc0943e8567341f3">DMG_LITE_GRAY</a>, <a class="el" href="gb_8h.html#a11cedc2ee58acfbbfc48dfb2b9a551b3">DMG_WHITE</a> </dd></dl>

</div>
</div>
<a id="ada0cc738d27aad251151e69cb8d250e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada0cc738d27aad251151e69cb8d250e1">&#9670;&nbsp;</a></span>SCREENWIDTH</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SCREENWIDTH&#160;&#160;&#160;<a class="el" href="sms_2hardware_8h.html#ad14c51cdfb347c34c364f54e67dc978d">DEVICE_SCREEN_PX_WIDTH</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Width of the visible screen in pixels. </p>

</div>
</div>
<a id="ae189e98d0ef9263c37869ce1ff3710a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae189e98d0ef9263c37869ce1ff3710a5">&#9670;&nbsp;</a></span>SCREENHEIGHT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SCREENHEIGHT&#160;&#160;&#160;<a class="el" href="sms_2hardware_8h.html#a7bd450aa268b881257089cf8cd6697ec">DEVICE_SCREEN_PX_HEIGHT</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Height of the visible screen in pixels. </p>

</div>
</div>
<a id="a5a796bbf3e4347d914b83568350143a9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5a796bbf3e4347d914b83568350143a9">&#9670;&nbsp;</a></span>MINWNDPOSX</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MINWNDPOSX&#160;&#160;&#160;<a class="el" href="nes_2hardware_8h.html#a62cb8564bf5e8cdd85ac33bc1c7896f2">DEVICE_WINDOW_PX_OFFSET_X</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The Minimum X position of the Window Layer (Left edge of screen) </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#aeef17768c494bcd6b67f7591329f7ff5">move_win()</a> </dd></dl>

</div>
</div>
<a id="af3d632ba2d7cef6619df5dfea8730909"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af3d632ba2d7cef6619df5dfea8730909">&#9670;&nbsp;</a></span>MINWNDPOSY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MINWNDPOSY&#160;&#160;&#160;<a class="el" href="nes_2hardware_8h.html#a3f8565ca9dc8eacd88d0d58313408329">DEVICE_WINDOW_PX_OFFSET_Y</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The Minimum Y position of the Window Layer (Top edge of screen) </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#aeef17768c494bcd6b67f7591329f7ff5">move_win()</a> </dd></dl>

</div>
</div>
<a id="a6dffb66ec1b1d9bb380a1af52a601ec5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6dffb66ec1b1d9bb380a1af52a601ec5">&#9670;&nbsp;</a></span>MAXWNDPOSX</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAXWNDPOSX&#160;&#160;&#160;(<a class="el" href="nes_2hardware_8h.html#a62cb8564bf5e8cdd85ac33bc1c7896f2">DEVICE_WINDOW_PX_OFFSET_X</a> + <a class="el" href="sms_2hardware_8h.html#ad14c51cdfb347c34c364f54e67dc978d">DEVICE_SCREEN_PX_WIDTH</a> - 1)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The Maximum X position of the Window Layer (Right edge of screen) </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#aeef17768c494bcd6b67f7591329f7ff5">move_win()</a> </dd></dl>

</div>
</div>
<a id="ad57f2f8c54204687f02801d8ab1bd150"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad57f2f8c54204687f02801d8ab1bd150">&#9670;&nbsp;</a></span>MAXWNDPOSY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAXWNDPOSY&#160;&#160;&#160;(<a class="el" href="nes_2hardware_8h.html#a3f8565ca9dc8eacd88d0d58313408329">DEVICE_WINDOW_PX_OFFSET_Y</a> + <a class="el" href="sms_2hardware_8h.html#a7bd450aa268b881257089cf8cd6697ec">DEVICE_SCREEN_PX_HEIGHT</a> - 1)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The Maximum Y position of the Window Layer (Bottom edge of screen) </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#aeef17768c494bcd6b67f7591329f7ff5">move_win()</a> </dd></dl>

</div>
</div>
<a id="a0031c07799247a6d6c1bfa3decac79d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0031c07799247a6d6c1bfa3decac79d0">&#9670;&nbsp;</a></span>DMG_TYPE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DMG_TYPE&#160;&#160;&#160;0x01</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Hardware Model: Original GB or Super GB. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a874b9bd95b0a05d6a6072feabc879e45">_cpu</a> </dd></dl>

</div>
</div>
<a id="ae996ed4fd8bb6b308b9c8708a91df06b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae996ed4fd8bb6b308b9c8708a91df06b">&#9670;&nbsp;</a></span>MGB_TYPE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MGB_TYPE&#160;&#160;&#160;0xFF</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Hardware Model: Pocket GB or Super GB 2. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a874b9bd95b0a05d6a6072feabc879e45">_cpu</a> </dd></dl>

</div>
</div>
<a id="aee435a3a0dde3dbd7b6112dbb456cde8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee435a3a0dde3dbd7b6112dbb456cde8">&#9670;&nbsp;</a></span>CGB_TYPE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CGB_TYPE&#160;&#160;&#160;0x11</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Hardware Model: Color GB. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a874b9bd95b0a05d6a6072feabc879e45">_cpu</a> </dd></dl>

</div>
</div>
<a id="aa311f84dd9fce6e136ba4881e7b0d98d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa311f84dd9fce6e136ba4881e7b0d98d">&#9670;&nbsp;</a></span>GBA_NOT_DETECTED</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define GBA_NOT_DETECTED&#160;&#160;&#160;0x00</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Hardware Model: DMG, CGB or MGB. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a874b9bd95b0a05d6a6072feabc879e45">_cpu</a>, <a class="el" href="gb_8h.html#a539b7b45b1c2d6b2051553665c76fd36">_is_GBA</a> </dd></dl>

</div>
</div>
<a id="a6ccf5d0f34fb0af0b6e73b9df0ccd745"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6ccf5d0f34fb0af0b6e73b9df0ccd745">&#9670;&nbsp;</a></span>GBA_DETECTED</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define GBA_DETECTED&#160;&#160;&#160;0x01</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Hardware Model: GBA. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a874b9bd95b0a05d6a6072feabc879e45">_cpu</a>, <a class="el" href="gb_8h.html#a539b7b45b1c2d6b2051553665c76fd36">_is_GBA</a> </dd></dl>

</div>
</div>
<a id="a231ec05679809190782e61c6e8aaaba4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a231ec05679809190782e61c6e8aaaba4">&#9670;&nbsp;</a></span>DEVICE_SUPPORTS_COLOR</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DEVICE_SUPPORTS_COLOR&#160;&#160;&#160;(<a class="el" href="gb_8h.html#a874b9bd95b0a05d6a6072feabc879e45">_cpu</a> == <a class="el" href="gb_8h.html#aee435a3a0dde3dbd7b6112dbb456cde8">CGB_TYPE</a>)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Macro returns TRUE if device supports color </p>

</div>
</div>
<a id="a559dbd32dba6867c1ee4e481077b62ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a559dbd32dba6867c1ee4e481077b62ab">&#9670;&nbsp;</a></span>VBL_DONE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define VBL_DONE&#160;&#160;&#160;<a class="el" href="sms_8h.html#a379ebafd4dc456a9a0c10290bb38fe7c">_vbl_done</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a268cc6c704e16f3fa02dd1cf0e17070a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a268cc6c704e16f3fa02dd1cf0e17070a">&#9670;&nbsp;</a></span>IO_IDLE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define IO_IDLE&#160;&#160;&#160;0x00U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Serial Link IO is completed </p>

</div>
</div>
<a id="ab69a3f7cd2c6b5eb4f518aefee099007"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab69a3f7cd2c6b5eb4f518aefee099007">&#9670;&nbsp;</a></span>IO_SENDING</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define IO_SENDING&#160;&#160;&#160;0x01U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Serial Link Sending data </p>

</div>
</div>
<a id="aee03efddee0f2f6fbcaec789301aaa9b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee03efddee0f2f6fbcaec789301aaa9b">&#9670;&nbsp;</a></span>IO_RECEIVING</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define IO_RECEIVING&#160;&#160;&#160;0x02U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Serial Link Receiving data </p>

</div>
</div>
<a id="a5d4c9c7b61a0326a939f9109f96d7423"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d4c9c7b61a0326a939f9109f96d7423">&#9670;&nbsp;</a></span>IO_ERROR</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define IO_ERROR&#160;&#160;&#160;0x04U</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Serial Link Error </p>

</div>
</div>
<a id="ae042588f20bf5a2349c8ad8716245233"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae042588f20bf5a2349c8ad8716245233">&#9670;&nbsp;</a></span>CURRENT_BANK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CURRENT_BANK&#160;&#160;&#160;<a class="el" href="nes_8h.html#a06bab3f8bce032de0d21fbd86e14c3f3">_current_bank</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a42705001e2b9897f5167b67fb36c69dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a42705001e2b9897f5167b67fb36c69dd">&#9670;&nbsp;</a></span>BANK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BANK</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">VARNAME</td><td>)</td>
          <td>&#160;&#160;&#160;( (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>) &amp; __bank_ ## VARNAME )</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Obtains the <b>bank number</b> of VARNAME</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VARNAME</td><td>Name of the variable which has a __bank_VARNAME companion symbol which is adjusted by bankpack</td></tr>
  </table>
  </dd>
</dl>
<p>Use this to obtain the bank number from a bank reference created with <a class="el" href="gb_8h.html#a086293f2afb4c7945460a4496b20aea3">BANKREF()</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a261bba55a07b802baf99346feadd9852">BANKREF_EXTERN()</a>, <a class="el" href="gb_8h.html#a086293f2afb4c7945460a4496b20aea3">BANKREF()</a> </dd></dl>

</div>
</div>
<a id="a086293f2afb4c7945460a4496b20aea3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a086293f2afb4c7945460a4496b20aea3">&#9670;&nbsp;</a></span>BANKREF</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BANKREF</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">VARNAME</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"><span class="keywordtype">void</span> __func_ ## VARNAME(<span class="keywordtype">void</span>) __banked __naked { \</div>
<div class="line">__asm \</div>
<div class="line">    .local b___func_ ## VARNAME \</div>
<div class="line">    ___bank_ ## VARNAME = b___func_ ## VARNAME \</div>
<div class="line">    .globl ___bank_ ## VARNAME \</div>
<div class="line">__endasm; \</div>
<div class="line">}</div>
</div><!-- fragment --><p>Creates a reference for retrieving the bank number of a variable or function</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VARNAME</td><td>Variable name to use, which may be an existing identifier</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a42705001e2b9897f5167b67fb36c69dd">BANK()</a> for obtaining the bank number of the included data.</dd></dl>
<p>More than one <code><a class="el" href="gb_8h.html#a086293f2afb4c7945460a4496b20aea3">BANKREF()</a></code> may be created per file, but each call should always use a unique VARNAME.</p>
<p>Use <a class="el" href="gb_8h.html#a261bba55a07b802baf99346feadd9852">BANKREF_EXTERN()</a> within another source file to make the variable and it's data accesible there. </p>

</div>
</div>
<a id="a261bba55a07b802baf99346feadd9852"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a261bba55a07b802baf99346feadd9852">&#9670;&nbsp;</a></span>BANKREF_EXTERN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BANKREF_EXTERN</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">VARNAME</td><td>)</td>
          <td>&#160;&#160;&#160;extern const void __bank_ ## VARNAME;</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Creates extern references for accessing a <a class="el" href="gb_8h.html#a086293f2afb4c7945460a4496b20aea3">BANKREF()</a> generated variable.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">VARNAME</td><td>Name of the variable used with <a class="el" href="gb_8h.html#a086293f2afb4c7945460a4496b20aea3">BANKREF()</a></td></tr>
  </table>
  </dd>
</dl>
<p>This makes a <a class="el" href="gb_8h.html#a086293f2afb4c7945460a4496b20aea3">BANKREF()</a> reference in another source file accessible in the current file for use with <a class="el" href="gb_8h.html#a42705001e2b9897f5167b67fb36c69dd">BANK()</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a086293f2afb4c7945460a4496b20aea3">BANKREF()</a>, <a class="el" href="gb_8h.html#a42705001e2b9897f5167b67fb36c69dd">BANK()</a> </dd></dl>

</div>
</div>
<a id="af61262bbc05629f31020afce67e1b9ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af61262bbc05629f31020afce67e1b9ea">&#9670;&nbsp;</a></span>SWITCH_ROM</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWITCH_ROM</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td><td>)</td>
          <td>&#160;&#160;&#160;(<a class="el" href="nes_8h.html#a06bab3f8bce032de0d21fbd86e14c3f3">_current_bank</a> = (<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>), <a class="el" href="gb_2hardware_8h.html#ae0976a29e341edc6ceb810e6eb0328f1">rROMB0</a> = (<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>))</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Makes default platform MBC switch the active ROM bank </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">b</td><td>ROM bank to switch to (max 255)</td></tr>
  </table>
  </dd>
</dl>
<ul>
<li>When used with MBC1 the max bank is Bank 31 (512K). </li>
<li>When used with MBC5 the max bank is Bank 255 (4MB). </li>
<li>To use the full 8MB size of MBC5 see <a class="el" href="gb_8h.html#a6c15ebc660abd3a978137493ab63ffe9">SWITCH_ROM_MBC5_8M()</a>.</li>
</ul>
<ul>
<li>For MBC1 some banks in it's range are unavailable (typically 0x20, 0x40, 0x60).</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>Using <a class="el" href="gb_8h.html#a6c15ebc660abd3a978137493ab63ffe9">SWITCH_ROM_MBC5_8M()</a> should not be mixed with using <a class="el" href="gb_8h.html#a92d040284342702026eb19dab59b586e">SWITCH_ROM_MBC5()</a> and <a class="el" href="gb_8h.html#af61262bbc05629f31020afce67e1b9ea">SWITCH_ROM()</a>.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a19558f5bbc9fea767f945001ae9cd13f">SWITCH_ROM_MBC1</a>, <a class="el" href="gb_8h.html#a92d040284342702026eb19dab59b586e">SWITCH_ROM_MBC5</a>, <a class="el" href="gb_8h.html#a3fca2d0a22aa2717e62fed659caf4743">SWITCH_ROM_MEGADUCK</a> </dd></dl>

</div>
</div>
<a id="a121feb0c32d124562f52398aa9656e7b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a121feb0c32d124562f52398aa9656e7b">&#9670;&nbsp;</a></span>SWITCH_RAM</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWITCH_RAM</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td><td>)</td>
          <td>&#160;&#160;&#160;(<a class="el" href="gb_2hardware_8h.html#ac2985dbccb16c4c00381d6fbe9600aff">rRAMB</a> = (<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>))</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Switches SRAM bank on MBC1 and other compatible MBCs </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">b</td><td>SRAM bank to switch to</td></tr>
  </table>
  </dd>
</dl>
<p>Before switching SRAM banks enable it using <a class="el" href="sms_8h.html#a0e9c88657beaac946231a4801481b97f">ENABLE_RAM</a></p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a38ea3e4dfe02b8eae70df27f39d4a951">SWITCH_RAM_MBC1</a>, <a class="el" href="gb_8h.html#a361d5055a7ae880fc1c9d6e0d1164fd6">SWITCH_RAM_MBC5</a> </dd></dl>

</div>
</div>
<a id="a0e9c88657beaac946231a4801481b97f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e9c88657beaac946231a4801481b97f">&#9670;&nbsp;</a></span>ENABLE_RAM</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ENABLE_RAM&#160;&#160;&#160;(<a class="el" href="gb_2hardware_8h.html#a64dd59016e4f0e78672962fbc553a4b4">rRAMG</a> = 0x0A)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enables SRAM on MBC1 and other compatible MBCs </p>

</div>
</div>
<a id="a649d27b5587de16a66176e03a1b8ebd5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a649d27b5587de16a66176e03a1b8ebd5">&#9670;&nbsp;</a></span>DISABLE_RAM</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DISABLE_RAM&#160;&#160;&#160;(<a class="el" href="gb_2hardware_8h.html#a64dd59016e4f0e78672962fbc553a4b4">rRAMG</a> = 0x00)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Disables SRAM on MBC1 and other compatible MBCs </p>

</div>
</div>
<a id="a3fca2d0a22aa2717e62fed659caf4743"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3fca2d0a22aa2717e62fed659caf4743">&#9670;&nbsp;</a></span>SWITCH_ROM_MEGADUCK</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWITCH_ROM_MEGADUCK</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="msx_8h.html#ac996706e2a5e73f010841437f26d4d4f">SWITCH_ROM</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Makes MEGADUCK MBC switch the active ROM bank </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">b</td><td>ROM bank to switch to (max <code>3</code> for 64K, or <code>7</code> for 128K) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a19558f5bbc9fea767f945001ae9cd13f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a19558f5bbc9fea767f945001ae9cd13f">&#9670;&nbsp;</a></span>SWITCH_ROM_MBC1</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWITCH_ROM_MBC1</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="msx_8h.html#ac996706e2a5e73f010841437f26d4d4f">SWITCH_ROM</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Makes MBC1 and other compatible MBCs switch the active ROM bank </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">b</td><td>ROM bank to switch to</td></tr>
  </table>
  </dd>
</dl>
<p>For MBC1 some banks in it's range are unavailable (typically 0x20, 0x40, 0x60).</p>
<p>See pandocs for more details <a href="https://gbdev.io/pandocs/MBC1">https://gbdev.io/pandocs/MBC1</a> </p>

</div>
</div>
<a id="a38ea3e4dfe02b8eae70df27f39d4a951"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a38ea3e4dfe02b8eae70df27f39d4a951">&#9670;&nbsp;</a></span>SWITCH_RAM_MBC1</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWITCH_RAM_MBC1</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="sms_8h.html#a121feb0c32d124562f52398aa9656e7b">SWITCH_RAM</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Switches SRAM bank on MBC1 and other compatible MBCs </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">b</td><td>SRAM bank to switch to</td></tr>
  </table>
  </dd>
</dl>
<p>Before switching SRAM banks enable it using <a class="el" href="sms_8h.html#a0e9c88657beaac946231a4801481b97f">ENABLE_RAM</a></p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a121feb0c32d124562f52398aa9656e7b">SWITCH_RAM</a>, <a class="el" href="gb_8h.html#a361d5055a7ae880fc1c9d6e0d1164fd6">SWITCH_RAM_MBC5</a> </dd></dl>

</div>
</div>
<a id="ae202f64307ec00f6970ef9225e54646c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae202f64307ec00f6970ef9225e54646c">&#9670;&nbsp;</a></span>ENABLE_RAM_MBC1</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ENABLE_RAM_MBC1&#160;&#160;&#160;<a class="el" href="sms_8h.html#a0e9c88657beaac946231a4801481b97f">ENABLE_RAM</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enables SRAM on MBC1 </p>

</div>
</div>
<a id="a177fadce938422926b186a8e42575d1d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a177fadce938422926b186a8e42575d1d">&#9670;&nbsp;</a></span>DISABLE_RAM_MBC1</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DISABLE_RAM_MBC1&#160;&#160;&#160;<a class="el" href="sms_8h.html#a649d27b5587de16a66176e03a1b8ebd5">DISABLE_RAM</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Disables SRAM on MBC1 </p>

</div>
</div>
<a id="a0c689c5a814f1c347c4d98f28ed6c7d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c689c5a814f1c347c4d98f28ed6c7d6">&#9670;&nbsp;</a></span>SWITCH_16_8_MODE_MBC1</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWITCH_16_8_MODE_MBC1&#160;&#160;&#160;(*(volatile <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *)0x6000 = 0x00)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="aa5d64e386a00b373f22ffdc5a152c7ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5d64e386a00b373f22ffdc5a152c7ba">&#9670;&nbsp;</a></span>SWITCH_4_32_MODE_MBC1</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWITCH_4_32_MODE_MBC1&#160;&#160;&#160;(*(volatile <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *)0x6000 = 0x01)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a92d040284342702026eb19dab59b586e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92d040284342702026eb19dab59b586e">&#9670;&nbsp;</a></span>SWITCH_ROM_MBC5</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWITCH_ROM_MBC5</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td><td>)</td>
          <td>&#160;&#160;&#160;(<a class="el" href="nes_8h.html#a06bab3f8bce032de0d21fbd86e14c3f3">_current_bank</a> = (<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>), <a class="el" href="gb_2hardware_8h.html#a014f3a9d7ce8f8026c9ac6c0410bb099">rROMB1</a> = 0, <a class="el" href="gb_2hardware_8h.html#ae0976a29e341edc6ceb810e6eb0328f1">rROMB0</a> = (<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>))</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Makes MBC5 switch to the active ROM bank </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">b</td><td>ROM bank to switch to (max 255)</td></tr>
  </table>
  </dd>
</dl>
<p>Supports up to ROM bank 255 (4 MB).</p>
<p><a class="el" href="gb_8h.html#a6c15ebc660abd3a978137493ab63ffe9">SWITCH_ROM_MBC5_8M</a> may be used if the full 8MB size is needed.</p>
<dl class="section note"><dt>Note</dt><dd>Using <a class="el" href="gb_8h.html#a6c15ebc660abd3a978137493ab63ffe9">SWITCH_ROM_MBC5_8M()</a> should not be mixed with using <a class="el" href="gb_8h.html#a92d040284342702026eb19dab59b586e">SWITCH_ROM_MBC5()</a> and <a class="el" href="gb_8h.html#af61262bbc05629f31020afce67e1b9ea">SWITCH_ROM()</a>.</dd></dl>
<p>Note the order used here. Writing the other way around on a MBC1 always selects bank 1 </p>

</div>
</div>
<a id="a6c15ebc660abd3a978137493ab63ffe9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c15ebc660abd3a978137493ab63ffe9">&#9670;&nbsp;</a></span>SWITCH_ROM_MBC5_8M</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWITCH_ROM_MBC5_8M</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td><td>)</td>
          <td>&#160;&#160;&#160;(<a class="el" href="gb_2hardware_8h.html#a014f3a9d7ce8f8026c9ac6c0410bb099">rROMB1</a> = ((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>) &gt;&gt; 8), <a class="el" href="gb_2hardware_8h.html#ae0976a29e341edc6ceb810e6eb0328f1">rROMB0</a> = (<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>))</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Makes MBC5 to switch the active ROM bank using the full 8MB size. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ae042588f20bf5a2349c8ad8716245233">CURRENT_BANK</a> </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">b</td><td>ROM bank to switch to</td></tr>
  </table>
  </dd>
</dl>
<p>This is an alternate to <a class="el" href="gb_8h.html#a92d040284342702026eb19dab59b586e">SWITCH_ROM_MBC5</a> which is limited to 4MB.</p>
<p>Note: </p><ul>
<li>Banked SDCC calls are not supported if you use this macro. </li>
<li>The active bank number is not tracked by <a class="el" href="sms_8h.html#ae042588f20bf5a2349c8ad8716245233">CURRENT_BANK</a> if you use this macro. </li>
<li>Using <a class="el" href="gb_8h.html#a6c15ebc660abd3a978137493ab63ffe9">SWITCH_ROM_MBC5_8M()</a> should not be mixed with using <a class="el" href="gb_8h.html#a92d040284342702026eb19dab59b586e">SWITCH_ROM_MBC5()</a> and <a class="el" href="gb_8h.html#af61262bbc05629f31020afce67e1b9ea">SWITCH_ROM()</a>.</li>
</ul>
<p>Note the order used here. Writing the other way around on a MBC1 always selects bank 1 </p>

</div>
</div>
<a id="a361d5055a7ae880fc1c9d6e0d1164fd6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a361d5055a7ae880fc1c9d6e0d1164fd6">&#9670;&nbsp;</a></span>SWITCH_RAM_MBC5</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SWITCH_RAM_MBC5</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a></td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="sms_8h.html#a121feb0c32d124562f52398aa9656e7b">SWITCH_RAM</a>(<a class="el" href="sms_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Switches SRAM bank on MBC5 </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">b</td><td>SRAM bank to switch to</td></tr>
  </table>
  </dd>
</dl>
<p>Before switching SRAM banks enable it using <a class="el" href="sms_8h.html#a0e9c88657beaac946231a4801481b97f">ENABLE_RAM</a> </p>

</div>
</div>
<a id="a3f033f00c8d781637f9a665b06750937"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f033f00c8d781637f9a665b06750937">&#9670;&nbsp;</a></span>ENABLE_RAM_MBC5</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ENABLE_RAM_MBC5&#160;&#160;&#160;<a class="el" href="sms_8h.html#a0e9c88657beaac946231a4801481b97f">ENABLE_RAM</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enables SRAM on MBC5 </p>

</div>
</div>
<a id="a60191cdfa50ed9b88515f181747eaba2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a60191cdfa50ed9b88515f181747eaba2">&#9670;&nbsp;</a></span>DISABLE_RAM_MBC5</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DISABLE_RAM_MBC5&#160;&#160;&#160;<a class="el" href="sms_8h.html#a649d27b5587de16a66176e03a1b8ebd5">DISABLE_RAM</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Disables SRAM on MBC5 </p>

</div>
</div>
<a id="a5ae6b05b3e1559c97f0d1b2daaaa0ee4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5ae6b05b3e1559c97f0d1b2daaaa0ee4">&#9670;&nbsp;</a></span>DISPLAY_ON</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DISPLAY_ON&#160;&#160;&#160;  <a class="el" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a>|=<a class="el" href="gb_2hardware_8h.html#a1491fc03ed7f02e7309cc7b0c48b6c8a">LCDCF_ON</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Turns the display back on. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#aae96812c15f9003428180ec3d0964145">display_off</a>, <a class="el" href="gb_8h.html#ad2ec9831813c5e7069917aa4455af682">DISPLAY_OFF</a> </dd></dl>

</div>
</div>
<a id="ad2ec9831813c5e7069917aa4455af682"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad2ec9831813c5e7069917aa4455af682">&#9670;&nbsp;</a></span>DISPLAY_OFF</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DISPLAY_OFF&#160;&#160;&#160;  <a class="el" href="sms_8h.html#afe5714734a8fea7b1617ba377b3c0a06">display_off</a>();</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Turns the display off</p>
<p>Waits until the VBL before turning the display off. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#aae96812c15f9003428180ec3d0964145">display_off</a>, <a class="el" href="gb_8h.html#a5ae6b05b3e1559c97f0d1b2daaaa0ee4">DISPLAY_ON</a> </dd></dl>

</div>
</div>
<a id="a0659212acd317ccdebc0ecf435df330f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0659212acd317ccdebc0ecf435df330f">&#9670;&nbsp;</a></span>HIDE_LEFT_COLUMN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HIDE_LEFT_COLUMN</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Does nothing for GB </p>

</div>
</div>
<a id="a5497c2255a9474d397446710189eacbe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5497c2255a9474d397446710189eacbe">&#9670;&nbsp;</a></span>SHOW_LEFT_COLUMN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SHOW_LEFT_COLUMN</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Does nothing for GB </p>

</div>
</div>
<a id="a3f3f7bd5879b807acbb203ce2aaa1e5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f3f7bd5879b807acbb203ce2aaa1e5d">&#9670;&nbsp;</a></span>SET_BORDER_COLOR</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SET_BORDER_COLOR</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">C</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Does nothing for GB </p>

</div>
</div>
<a id="a8e3f36aa68ac036695816757f2a1322c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8e3f36aa68ac036695816757f2a1322c">&#9670;&nbsp;</a></span>SHOW_BKG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SHOW_BKG&#160;&#160;&#160;  <a class="el" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a>|=<a class="el" href="gb_2hardware_8h.html#a97ab19d938f05bffbcb4221824c3bfce">LCDCF_BGON</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Turns on the background layer. Sets bit 0 of the LCDC register to 1.</p>
<p>Doesn't work in CGB mode - the bit is reused to control sprite priority over background and window layers instead. </p><ul>
<li>If 1 (SHOW_BKG), everything works as usual. </li>
<li>If 0 (HIDE_BKG), all sprites are always drawn over background and window, ignoring any other priority settings. </li>
</ul>

</div>
</div>
<a id="a6d25f7c43b1cbbb48b95cda7ab2c3141"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6d25f7c43b1cbbb48b95cda7ab2c3141">&#9670;&nbsp;</a></span>HIDE_BKG</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HIDE_BKG&#160;&#160;&#160;  <a class="el" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a>&amp;=~<a class="el" href="gb_2hardware_8h.html#a97ab19d938f05bffbcb4221824c3bfce">LCDCF_BGON</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Turns off the background layer. Sets bit 0 of the LCDC register to 0.</p>
<p>Doesn't work in CGB mode - the bit is reused to control sprite priority over background and window layers instead. </p><ul>
<li>If 1 (SHOW_BKG), everything works as usual. </li>
<li>If 0 (HIDE_BKG), all sprites are always drawn over background and window, ignoring any other priority settings. </li>
</ul>

</div>
</div>
<a id="ab19da2ab719bb8897bc0843a84af28f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab19da2ab719bb8897bc0843a84af28f8">&#9670;&nbsp;</a></span>SHOW_WIN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SHOW_WIN&#160;&#160;&#160;  <a class="el" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a>|=<a class="el" href="gb_2hardware_8h.html#a13a5f08b9aae68f8fa57a8aa7705b732">LCDCF_WINON</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Turns on the Window layer Sets bit 5 of the LCDC register to 1.</p>
<p>This only controls Window visibility. If either the Background layer (which the window is part of) or the Display are not turned then the Window contents will not be visible. Those can be turned on using <a class="el" href="sms_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a> and <a class="el" href="sms_8h.html#a5ae6b05b3e1559c97f0d1b2daaaa0ee4">DISPLAY_ON</a>. </p>

</div>
</div>
<a id="aedb6e32c42d4b1d25ad11adccd7100c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aedb6e32c42d4b1d25ad11adccd7100c3">&#9670;&nbsp;</a></span>HIDE_WIN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HIDE_WIN&#160;&#160;&#160;  <a class="el" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a>&amp;=~<a class="el" href="gb_2hardware_8h.html#a13a5f08b9aae68f8fa57a8aa7705b732">LCDCF_WINON</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Turns off the window layer. Clears bit 5 of the LCDC register to 0. </p>

</div>
</div>
<a id="a495bc9f405f916f02ad5d97e6e730134"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a495bc9f405f916f02ad5d97e6e730134">&#9670;&nbsp;</a></span>SHOW_SPRITES</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SHOW_SPRITES&#160;&#160;&#160;  <a class="el" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a>|=<a class="el" href="gb_2hardware_8h.html#a6aef42158c90e8025b8341cdea2e3918">LCDCF_OBJON</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Turns on the sprites layer. Sets bit 1 of the LCDC register to 1. </p>

</div>
</div>
<a id="a69ef98aee664b8abd8d1a3d45f016dda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69ef98aee664b8abd8d1a3d45f016dda">&#9670;&nbsp;</a></span>HIDE_SPRITES</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HIDE_SPRITES&#160;&#160;&#160;  <a class="el" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a>&amp;=~<a class="el" href="gb_2hardware_8h.html#a6aef42158c90e8025b8341cdea2e3918">LCDCF_OBJON</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Turns off the sprites layer. Clears bit 1 of the LCDC register to 0.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ad22c51635d052399bbbe1777999c794d">hide_sprite</a>, <a class="el" href="sms_2metasprites_8h.html#a51db5a47025de1c8765885281999d53c">hide_sprites_range</a> </dd></dl>

</div>
</div>
<a id="af91d252f07f4764996154820f970c101"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af91d252f07f4764996154820f970c101">&#9670;&nbsp;</a></span>SPRITES_8x16</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPRITES_8x16&#160;&#160;&#160;  <a class="el" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a>|=<a class="el" href="gb_2hardware_8h.html#a14eddd3d53d8e649f1754bd455b4863d">LCDCF_OBJ16</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets sprite size to 8x16 pixels, two tiles one above the other. Sets bit 2 of the LCDC register to 1. </p>

</div>
</div>
<a id="aa87bec0d134136fdb727f52cb773b792"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa87bec0d134136fdb727f52cb773b792">&#9670;&nbsp;</a></span>SPRITES_8x8</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SPRITES_8x8&#160;&#160;&#160;  <a class="el" href="gb_2hardware_8h.html#a6515fdfaa50eeb7e63faeea54f77cd6b">LCDC_REG</a>&amp;=~<a class="el" href="gb_2hardware_8h.html#a14eddd3d53d8e649f1754bd455b4863d">LCDCF_OBJ16</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets sprite size to 8x8 pixels, one tile. Clears bit 2 of the LCDC register to 0. </p>

</div>
</div>
<a id="a67f80e65620470b55a4950e2966eb868"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a67f80e65620470b55a4950e2966eb868">&#9670;&nbsp;</a></span>COMPAT_PALETTE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define COMPAT_PALETTE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">C0, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">C1, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">C2, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">C3&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;((<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)(((C3) &lt;&lt; 6) | ((C2) &lt;&lt; 4) | ((C1) &lt;&lt; 2) | (C0)))</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ab94bfec130df50d9cb808142f94603a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab94bfec130df50d9cb808142f94603a5">&#9670;&nbsp;</a></span>set_bkg_2bpp_data</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define set_bkg_2bpp_data&#160;&#160;&#160;<a class="el" href="sms_8h.html#a8130306da1177f4fef89e699f8e2add4">set_bkg_data</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a55f82ff980398dd97036fd936ebd727e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a55f82ff980398dd97036fd936ebd727e">&#9670;&nbsp;</a></span>set_tile_map</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define set_tile_map&#160;&#160;&#160;<a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="adb5d0970167b81401113812773c90838"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb5d0970167b81401113812773c90838">&#9670;&nbsp;</a></span>set_tile_submap</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define set_tile_submap&#160;&#160;&#160;<a class="el" href="sms_8h.html#a0cfd261bc7a94b1f6093f423bad30298">set_bkg_submap</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a3b235c526c517fb02d20cdea780ee2c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b235c526c517fb02d20cdea780ee2c5">&#9670;&nbsp;</a></span>set_tile_xy</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define set_tile_xy&#160;&#160;&#160;<a class="el" href="nes_8h.html#a31655c4b138654e803e295bd4413759c">set_bkg_tile_xy</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ad7a73323735000cf26196e073cbbdcbf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad7a73323735000cf26196e073cbbdcbf">&#9670;&nbsp;</a></span>set_attribute_xy</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define set_attribute_xy&#160;&#160;&#160;<a class="el" href="nes_8h.html#a7cd23c81062d37753a4429b794907524">set_bkg_attribute_xy</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a43b4f0ba65856deef626c0d9e7e41ed4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43b4f0ba65856deef626c0d9e7e41ed4">&#9670;&nbsp;</a></span>set_sprite_2bpp_data</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define set_sprite_2bpp_data&#160;&#160;&#160;<a class="el" href="sms_8h.html#a216a3e3d320ee4d8cf4845600487ae39">set_sprite_data</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a47607089a434dcda7a8583cfca03b604"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47607089a434dcda7a8583cfca03b604">&#9670;&nbsp;</a></span>DISABLE_OAM_DMA</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DISABLE_OAM_DMA&#160;&#160;&#160;    <a class="el" href="sms_8h.html#a5435fd985412934e96a490e103c6bc49">_shadow_OAM_base</a> = 0</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="abfd70bf31185a4900680977c9fb5a5ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abfd70bf31185a4900680977c9fb5a5ec">&#9670;&nbsp;</a></span>DISABLE_VBL_TRANSFER</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DISABLE_VBL_TRANSFER&#160;&#160;&#160;<a class="el" href="nes_8h.html#a47607089a434dcda7a8583cfca03b604">DISABLE_OAM_DMA</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Disable OAM DMA copy each VBlank </p>

</div>
</div>
<a id="a20895d53fe9caacb08ce8b071d57ce53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a20895d53fe9caacb08ce8b071d57ce53">&#9670;&nbsp;</a></span>ENABLE_OAM_DMA</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ENABLE_OAM_DMA&#160;&#160;&#160;    <a class="el" href="sms_8h.html#a5435fd985412934e96a490e103c6bc49">_shadow_OAM_base</a> = (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>)((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)&amp;<a class="el" href="sms_8h.html#af02f9e73bd894cc25e03aedb0a10a91d">shadow_OAM</a> &gt;&gt; 8)</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a77d516c9d3f86f100eddea5e0d133a76"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77d516c9d3f86f100eddea5e0d133a76">&#9670;&nbsp;</a></span>ENABLE_VBL_TRANSFER</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ENABLE_VBL_TRANSFER&#160;&#160;&#160;<a class="el" href="nes_8h.html#a20895d53fe9caacb08ce8b071d57ce53">ENABLE_OAM_DMA</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enable OAM DMA copy each VBlank and set it to transfer default shadow_OAM array </p>

</div>
</div>
<a id="a8b77608c87a9aef65a03531482b2163b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b77608c87a9aef65a03531482b2163b">&#9670;&nbsp;</a></span>MAX_HARDWARE_SPRITES</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_HARDWARE_SPRITES&#160;&#160;&#160;40</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Amount of hardware sprites in OAM </p>

</div>
</div>
<a id="afc296eacbda6a42f2a71aacab376ceb7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc296eacbda6a42f2a71aacab376ceb7">&#9670;&nbsp;</a></span>HARDWARE_SPRITE_CAN_FLIP_X</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HARDWARE_SPRITE_CAN_FLIP_X&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>True if sprite hardware can flip sprites by X (horizontally) </p>

</div>
</div>
<a id="a9119d69d971f6bee9e55d0df8f0ac983"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9119d69d971f6bee9e55d0df8f0ac983">&#9670;&nbsp;</a></span>HARDWARE_SPRITE_CAN_FLIP_Y</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define HARDWARE_SPRITE_CAN_FLIP_Y&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>True if sprite hardware can flip sprites by Y (vertically) </p>

</div>
</div>
<a id="a47865835d7d007d71b4bc8ae5cefb73a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47865835d7d007d71b4bc8ae5cefb73a">&#9670;&nbsp;</a></span>fill_rect</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define fill_rect&#160;&#160;&#160;<a class="el" href="nes_8h.html#a6879d813b6105ff8d9b36ec55c26a36e">fill_bkg_rect</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="a9508f919d9482d1d51534ccac212454d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9508f919d9482d1d51534ccac212454d">&#9670;&nbsp;</a></span>int_handler</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* int_handler) (void) <a class="el" href="asm_2types_8h.html#a7ed081d8dfb6902784b2fc730bbb7f96">NONBANKED</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Interrupt handlers </p>

</div>
</div>
<a id="a8e5ea12b86bdfc812448c2f5c4336c03"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8e5ea12b86bdfc812448c2f5c4336c03">&#9670;&nbsp;</a></span>OAM_item_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="struct_o_a_m__item__t.html">OAM_item_t</a> <a class="el" href="struct_o_a_m__item__t.html">OAM_item_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sprite Attributes structure </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Coordinate of the sprite on screen </td></tr>
    <tr><td class="paramname">y</td><td>Y Coordinate of the sprite on screen </td></tr>
    <tr><td class="paramname">tile</td><td>Sprite tile number (see <a class="el" href="sms_8h.html#a05bf0b9f1328de7b568a19a2a428bcfe">set_sprite_tile</a>) </td></tr>
    <tr><td class="paramname">prop</td><td>OAM Property Flags (see <a class="el" href="sms_8h.html#a99ea3252469e3614e977cce2aa1d06f7">set_sprite_prop</a>) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ac6b62210da8713ab1fca7cb3ff6e80c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac6b62210da8713ab1fca7cb3ff6e80c5">&#9670;&nbsp;</a></span>remove_VBL()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void remove_VBL </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The remove functions will remove any interrupt handler.</p>
<p>A handler of NULL will cause bad things to happen if the given interrupt is enabled.</p>
<p>Removes the VBL interrupt handler. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="msx_8h.html#ae59628e2237f301df1341e22bfc8296e">add_VBL()</a></dd></dl>
<p>Removes the VBL interrupt handler. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="msx_8h.html#ae59628e2237f301df1341e22bfc8296e">add_VBL()</a> </dd></dl>

</div>
</div>
<a id="a67ef797ca230a941c1cc0c580720327b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a67ef797ca230a941c1cc0c580720327b">&#9670;&nbsp;</a></span>remove_LCD()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void remove_LCD </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Removes the LCD interrupt handler. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ae2dae907ea199eee9abb0eb4b831778f">add_LCD()</a>, <a class="el" href="gb_8h.html#ac6b62210da8713ab1fca7cb3ff6e80c5">remove_VBL()</a> </dd></dl>

</div>
</div>
<a id="a623f1ed8ee1d48bfa6e884d546991a6f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a623f1ed8ee1d48bfa6e884d546991a6f">&#9670;&nbsp;</a></span>remove_TIM()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void remove_TIM </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Removes the TIM interrupt handler. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#aa1b9d8d215e844834d2be5c10969d712">add_TIM()</a>, <a class="el" href="gb_8h.html#ac6b62210da8713ab1fca7cb3ff6e80c5">remove_VBL()</a> </dd></dl>

</div>
</div>
<a id="a325751f7e2373601d2a7a94671deef29"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a325751f7e2373601d2a7a94671deef29">&#9670;&nbsp;</a></span>remove_SIO()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void remove_SIO </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Removes the Serial Link / SIO interrupt handler. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ae655adc762bf0b4320d2e11d2e5fbc72">add_SIO()</a>, </dd>
<dd>
<a class="el" href="gb_8h.html#ac6b62210da8713ab1fca7cb3ff6e80c5">remove_VBL()</a></dd></dl>
<p>The default SIO ISR gets installed automatically if any of the standard SIO calls are used (<a class="el" href="gb_8h.html#a1259cf3a23fd2166a9d1a2e93942e30e">send_byte()</a>, <a class="el" href="gb_8h.html#a34d6500215984e8f9a986523a2f2dadd">receive_byte()</a>).</p>
<p>Once installed the default SIO ISR cannot be removed. Only secondary chained SIO ISRs (added with <a class="el" href="gb_8h.html#ae655adc762bf0b4320d2e11d2e5fbc72">add_SIO()</a>) can be removed. </p>

</div>
</div>
<a id="a62770721f72bd8ad399a7bfcc0305db2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62770721f72bd8ad399a7bfcc0305db2">&#9670;&nbsp;</a></span>remove_JOY()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void remove_JOY </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Removes the JOY interrupt handler. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ae370c3fa15b70edda4c26464d49129a8">add_JOY()</a>, <a class="el" href="gb_8h.html#ac6b62210da8713ab1fca7cb3ff6e80c5">remove_VBL()</a> </dd></dl>

</div>
</div>
<a id="a83bce4c8764eddefd9ab8af88669065e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83bce4c8764eddefd9ab8af88669065e">&#9670;&nbsp;</a></span>add_VBL()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void add_VBL </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Adds a Vertical Blanking interrupt handler.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">h</td><td>The handler to be called whenever a V-blank interrupt occurs.</td></tr>
  </table>
  </dd>
</dl>
<p>Up to 4 handlers may be added, with the last added being called last.</p>
<p><b>Do not</b> use the function definition attributes <a class="el" href="asm_2types_8h.html#ae0233515480e60d29bcc731469976e02">CRITICAL</a> and <a class="el" href="asm_2types_8h.html#ac950c0db046e2f86d15e7ae1f558b017">INTERRUPT</a> when declaring ISR functions added via <a class="el" href="msx_8h.html#ae59628e2237f301df1341e22bfc8296e">add_VBL()</a> (or LCD, etc). Those attributes are only required when constructing a bare jump from the interrupt vector itself (such as with <a class="el" href="isr_8h.html#a73769fed9338af86fdb7df35d7b82620">ISR_VECTOR()</a>).</p>
<p>ISR handlers added using <a class="el" href="msx_8h.html#ae59628e2237f301df1341e22bfc8296e">add_VBL()</a>/etc are instead called via the GBDK ISR dispatcher which makes the extra function attributes unecessary.</p>
<dl class="section note"><dt>Note</dt><dd>The default GBDK VBL is installed automatically.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="isr_8h.html#a73769fed9338af86fdb7df35d7b82620">ISR_VECTOR()</a></dd></dl>
<p>Adds a V-blank interrupt handler. </p>

</div>
</div>
<a id="ae2dae907ea199eee9abb0eb4b831778f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae2dae907ea199eee9abb0eb4b831778f">&#9670;&nbsp;</a></span>add_LCD()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void add_LCD </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Adds a LCD interrupt handler.</p>
<p>Called when the LCD interrupt occurs.</p>
<p>Up to 3 handlers may be added, with the last added being called last.</p>
<p>There are various sources controlled by the <a class="el" href="gb_2hardware_8h.html#ad40ebf3b29add46cdd310a7e0802bc6b">STAT_REG</a> register ($FF41) which can trigger this interrupt. Common examples include triggering on specific scanlines using <a class="el" href="gb_2hardware_8h.html#aeb643bd4eac2e6e410cae2fae677c0a7">LY_REG</a> == <a class="el" href="gb_2hardware_8h.html#a591084a506c33266b7d6cc3b4b8936ae">LYC_REG</a>. Another is applying graphics effects on a per-scanline basis such as modifying the X and Y scroll registers (<a class="el" href="gb_2hardware_8h.html#a86cc170585319565195f2c163250be1f">SCX_REG</a> / <a class="el" href="gb_2hardware_8h.html#a244b162cf13bbcb4fe842d7e298b39c2">SCY_REG</a> registers).</p>
<dl class="section note"><dt>Note</dt><dd>LYC may not trigger with scanline 0 in the same way as other scanlines due to particular behavior with scanlines 153 and 0. Instead, using an <a class="el" href="msx_8h.html#ae59628e2237f301df1341e22bfc8296e">add_VBL()</a> interrupt handler for start of frame behavior may be more suitable.</dd></dl>
<p><b>Do not</b> use the function definition attributes <a class="el" href="asm_2types_8h.html#ae0233515480e60d29bcc731469976e02">CRITICAL</a> and <a class="el" href="asm_2types_8h.html#ac950c0db046e2f86d15e7ae1f558b017">INTERRUPT</a> when declaring ISR functions added via <a class="el" href="msx_8h.html#ae59628e2237f301df1341e22bfc8296e">add_VBL()</a> (or LCD, etc). Those attributes are only required when constructing a bare jump from the interrupt vector itself (such as with <a class="el" href="isr_8h.html#a73769fed9338af86fdb7df35d7b82620">ISR_VECTOR()</a>).</p>
<p>ISR handlers added using add_VBL/LCD/etc are instead called via the GBDK ISR dispatcher which makes the extra function attributes unecessary.</p>
<p>If this ISR is to be called once per each scanline then make sure that the time it takes to execute is less than the duration of a scanline.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="msx_8h.html#ae59628e2237f301df1341e22bfc8296e">add_VBL</a>, <a class="el" href="gb_8h.html#a4e4afc51edff293a392211cb8d836591">nowait_int_handler</a>, <a class="el" href="isr_8h.html#a73769fed9338af86fdb7df35d7b82620">ISR_VECTOR()</a></dd></dl>
<p>Adds a LCD interrupt handler. </p>

</div>
</div>
<a id="aa1b9d8d215e844834d2be5c10969d712"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa1b9d8d215e844834d2be5c10969d712">&#9670;&nbsp;</a></span>add_TIM()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void add_TIM </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Adds a timer interrupt handler.</p>
<p>Can not be used together with <a class="el" href="gb_8h.html#a617176cc314371eeddcd8903584d62f0">add_low_priority_TIM</a></p>
<p>This interrupt occurs when the <a class="el" href="sms_2hardware_8h.html#a4741a62d05deefc649df160baca326dd">TIMA_REG</a> register ($FF05) changes from $FF to $00.</p>
<p>Up to 4 handlers may be added, with the last added being called last.</p>
<dl class="section note"><dt>Note</dt><dd>For NES make sure to wrap TIM interrupt handlers with a nooverlay pragma. For more details see <a class="el" href="docs_supported_consoles.html#docs_nes_tim_overlay">docs_nes_tim_overlay</a></dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a83bce4c8764eddefd9ab8af88669065e">add_VBL</a> </dd>
<dd>
<a class="el" href="gb_8h.html#ae6bc65c789195b4c19ee8765b1a2aa28">set_interrupts()</a> with <a class="el" href="gb_8h.html#a604256210ec5b90b68185e1a18efab49">TIM_IFLAG</a>, <a class="el" href="isr_8h.html#a73769fed9338af86fdb7df35d7b82620">ISR_VECTOR()</a> </dd></dl>

</div>
</div>
<a id="a617176cc314371eeddcd8903584d62f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a617176cc314371eeddcd8903584d62f0">&#9670;&nbsp;</a></span>add_low_priority_TIM()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void add_low_priority_TIM </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Adds a timer interrupt handler, that could be interrupted by the other interrupts, as well as itself, if it runs too slow.</p>
<p>Can not be used together with <a class="el" href="sms_8h.html#a6c66a583a8f0744e3985c89725e3dc10">add_TIM</a></p>
<p>This interrupt occurs when the <a class="el" href="sms_2hardware_8h.html#a4741a62d05deefc649df160baca326dd">TIMA_REG</a> register ($FF05) changes from $FF to $00.</p>
<p>Up to 4 handlers may be added, with the last added being called last.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a83bce4c8764eddefd9ab8af88669065e">add_VBL</a> </dd>
<dd>
<a class="el" href="gb_8h.html#ae6bc65c789195b4c19ee8765b1a2aa28">set_interrupts()</a> with <a class="el" href="gb_8h.html#a604256210ec5b90b68185e1a18efab49">TIM_IFLAG</a>, <a class="el" href="isr_8h.html#a73769fed9338af86fdb7df35d7b82620">ISR_VECTOR()</a> </dd></dl>

</div>
</div>
<a id="ae655adc762bf0b4320d2e11d2e5fbc72"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae655adc762bf0b4320d2e11d2e5fbc72">&#9670;&nbsp;</a></span>add_SIO()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void add_SIO </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Adds a Serial Link transmit complete interrupt handler.</p>
<p>This interrupt occurs when a serial transfer has completed on the game link port.</p>
<p>Up to 4 handlers may be added, with the last added being called last.</p>
<p>The default SIO ISR gets installed automatically if any of the standard SIO calls are used (<a class="el" href="gb_8h.html#a1259cf3a23fd2166a9d1a2e93942e30e">send_byte()</a>, <a class="el" href="gb_8h.html#a34d6500215984e8f9a986523a2f2dadd">receive_byte()</a>).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a1259cf3a23fd2166a9d1a2e93942e30e">send_byte</a>, <a class="el" href="gb_8h.html#a34d6500215984e8f9a986523a2f2dadd">receive_byte()</a>, <a class="el" href="gb_8h.html#a83bce4c8764eddefd9ab8af88669065e">add_VBL()</a> </dd>
<dd>
<a class="el" href="gb_8h.html#ae6bc65c789195b4c19ee8765b1a2aa28">set_interrupts()</a> with <a class="el" href="gb_8h.html#ad90564458646c5646b3880b93db3443e">SIO_IFLAG</a> </dd></dl>

</div>
</div>
<a id="ae370c3fa15b70edda4c26464d49129a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae370c3fa15b70edda4c26464d49129a8">&#9670;&nbsp;</a></span>add_JOY()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void add_JOY </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="sms_8h.html#a9508f919d9482d1d51534ccac212454d">int_handler</a>&#160;</td>
          <td class="paramname"><em>h</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Adds a joypad button change interrupt handler.</p>
<p>This interrupt occurs on a transition of any of the keypad input lines from high to low, if the relevant <a class="el" href="gb_2hardware_8h.html#a04f9a36ab04334fcd21d2f50c125d5d0">P1_REG</a> bits 4 or 5 are set.</p>
<p>For details about configuring flags or reading the data see: <a href="https://gbdev.io/pandocs/Interrupt_Sources.html#int-60&ndash;joypad-interrupt">https://gbdev.io/pandocs/Interrupt_Sources.html#int-60&amp;ndash;joypad-interrupt</a> <a href="https://gbdev.io/pandocs/Joypad_Input.html#ff00&ndash;p1joyp-joypad">https://gbdev.io/pandocs/Joypad_Input.html#ff00&amp;ndash;p1joyp-joypad</a></p>
<p>Due to the fact that keypad "bounce" is virtually always present, software should expect this interrupt to occur one or more times for every button press and one or more times for every button release.</p>
<p>Up to 4 handlers may be added, with the last added being called last.</p>
<p>An example use of this is allowing the user to trigger an exit from the lower-power STOP cpu state.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a4344fefd260763e12703138066841b19">joypad()</a>, <a class="el" href="gb_8h.html#a83bce4c8764eddefd9ab8af88669065e">add_VBL()</a>, <a class="el" href="gb_2hardware_8h.html#aa7ce989df75547f190d33cc85dce0187">IEF_HILO</a>, <a class="el" href="gb_2hardware_8h.html#a6963ef598339e1163d30e57a962e5278">P1F_5</a>, <a class="el" href="gb_2hardware_8h.html#ad215dbfc83c9486ead2f28510366f40b">P1F_4</a>, <a class="el" href="gb_2hardware_8h.html#ae8e325a01af1c20935a0c73ea6465a0e">P1F_3</a>, <a class="el" href="gb_2hardware_8h.html#af59d0dd661ea73965101294d30111385">P1F_2</a>, <a class="el" href="gb_2hardware_8h.html#aad20c4bf5115b40c9118a484808f4b92">P1F_1</a>, <a class="el" href="gb_2hardware_8h.html#aedf8627c42ccf0aad5025ef629f4395a">P1F_0</a>, <a class="el" href="gb_2hardware_8h.html#aeaabebe6a36d9e59a01dfceceb7b37d0">P1F_GET_DPAD</a>, <a class="el" href="gb_2hardware_8h.html#a750bc82ab34a8929a5bba10f2336abe6">P1F_GET_BTN</a>, <a class="el" href="gb_2hardware_8h.html#a5c97ffb0ee0a345ad31797da26410b5a">P1F_GET_NONE</a> </dd></dl>

</div>
</div>
<a id="a4e4afc51edff293a392211cb8d836591"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e4afc51edff293a392211cb8d836591">&#9670;&nbsp;</a></span>nowait_int_handler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nowait_int_handler </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Interrupt handler chain terminator that does <b>not</b> wait for .STAT</p>
<p>You must add this handler last in every interrupt handler chain if you want to change the default interrupt handler behaviour that waits for LCD controller mode to become 1 or 0 before return from the interrupt.</p>
<p>Example: </p><div class="fragment"><div class="line"><a class="code" href="asm_2types_8h.html#ae0233515480e60d29bcc731469976e02">CRITICAL</a> {</div>
<div class="line">    <a class="code" href="gb_8h.html#ae655adc762bf0b4320d2e11d2e5fbc72">add_SIO</a>(<a class="code" href="gb_8h.html#a4e4afc51edff293a392211cb8d836591">nowait_int_handler</a>); <span class="comment">// Disable wait on VRAM state before returning from SIO interrupt</span></div>
<div class="line">}</div>
<div class="ttc" id="aasm_2types_8h_html_ae0233515480e60d29bcc731469976e02"><div class="ttname"><a href="asm_2types_8h.html#ae0233515480e60d29bcc731469976e02">CRITICAL</a></div><div class="ttdeci">#define CRITICAL</div><div class="ttdef"><b>Definition:</b> types.h:46</div></div>
<div class="ttc" id="agb_8h_html_a4e4afc51edff293a392211cb8d836591"><div class="ttname"><a href="gb_8h.html#a4e4afc51edff293a392211cb8d836591">nowait_int_handler</a></div><div class="ttdeci">void nowait_int_handler(void)</div></div>
<div class="ttc" id="agb_8h_html_ae655adc762bf0b4320d2e11d2e5fbc72"><div class="ttname"><a href="gb_8h.html#ae655adc762bf0b4320d2e11d2e5fbc72">add_SIO</a></div><div class="ttdeci">void add_SIO(int_handler h)</div></div>
</div><!-- fragment --> <dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a4d670e24f1a48820fa2e612de3224234">wait_int_handler()</a> </dd></dl>

</div>
</div>
<a id="a4d670e24f1a48820fa2e612de3224234"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d670e24f1a48820fa2e612de3224234">&#9670;&nbsp;</a></span>wait_int_handler()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wait_int_handler </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Default Interrupt handler chain terminator that waits for </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_2hardware_8h.html#ad40ebf3b29add46cdd310a7e0802bc6b">STAT_REG</a> and <b>only</b> returns at the BEGINNING of either Mode 0 or Mode 1.</dd></dl>
<p>Used by default at the end of interrupt chains to help prevent graphical glitches. The glitches are caused when an ISR interrupts a graphics operation in one mode but returns in a different mode for which that graphics operation is not allowed.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a4e4afc51edff293a392211cb8d836591">nowait_int_handler()</a> </dd></dl>

</div>
</div>
<a id="ade1cd2eab862b0e479415288964b3d63"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade1cd2eab862b0e479415288964b3d63">&#9670;&nbsp;</a></span>cancel_pending_interrupts()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> cancel_pending_interrupts </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Cancel pending interrupts </p>

</div>
</div>
<a id="afb0c344e6a417709af9497543f072aa3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb0c344e6a417709af9497543f072aa3">&#9670;&nbsp;</a></span>mode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set the current screen mode - one of M_* modes</p>
<p>Normally used by internal functions only.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#acc9798fc62b5d626c91c8b0f20b522ff">M_DRAWING</a>, <a class="el" href="gb_8h.html#af0e30d6af308ffe5a025fbe85da40f6f">M_TEXT_OUT</a>, <a class="el" href="gb_8h.html#a908826e7180f94a5988ceb8633313a2e">M_TEXT_INOUT</a>, <a class="el" href="gb_8h.html#a04382de20738146fe873ddfb0585052b">M_NO_SCROLL</a>, <a class="el" href="gb_8h.html#aca2855edd2d28f66be551a0f7ec23f07">M_NO_INTERP</a> </dd></dl>

</div>
</div>
<a id="aa1bf03fa405248ec322b2a02d95975de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa1bf03fa405248ec322b2a02d95975de">&#9670;&nbsp;</a></span>get_mode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> get_mode </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the current mode</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#acc9798fc62b5d626c91c8b0f20b522ff">M_DRAWING</a>, <a class="el" href="gb_8h.html#af0e30d6af308ffe5a025fbe85da40f6f">M_TEXT_OUT</a>, <a class="el" href="gb_8h.html#a908826e7180f94a5988ceb8633313a2e">M_TEXT_INOUT</a>, <a class="el" href="gb_8h.html#a04382de20738146fe873ddfb0585052b">M_NO_SCROLL</a>, <a class="el" href="gb_8h.html#aca2855edd2d28f66be551a0f7ec23f07">M_NO_INTERP</a> </dd></dl>

</div>
</div>
<a id="a4093fb5f45f807fe8d4a45121f3fffc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4093fb5f45f807fe8d4a45121f3fffc5">&#9670;&nbsp;</a></span>get_system()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> get_system </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the system gbdk is running on.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ad6329c19927cf02579e2503e40c0bbde">SYSTEM_50HZ</a>, <a class="el" href="gb_8h.html#a99bca2df4c6fde16a659797b4e584036">SYSTEM_60HZ</a>, <a class="el" href="nes_8h.html#aa370f208d677a232346ddf00a8ef7243">SYSTEM_BITS_DENDY</a>, <a class="el" href="nes_8h.html#a1e73068b3ffdb8436eaa3362f104ba74">SYSTEM_BITS_NTSC</a>, <a class="el" href="nes_8h.html#a599f3df346be94f25498749e2442bde8">SYSTEM_BITS_PAL</a>, <a class="el" href="msx_2hardware_8h.html#ae6888157a94fca2f1a1b5136494f2e07">SYSTEM_NTSC</a> <a class="el" href="msx_2hardware_8h.html#a1ac4bf5582e0754ea814c3f51c99a91a">SYSTEM_PAL</a> </dd></dl>

</div>
</div>
<a id="a1259cf3a23fd2166a9d1a2e93942e30e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1259cf3a23fd2166a9d1a2e93942e30e">&#9670;&nbsp;</a></span>send_byte()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void send_byte </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Serial Link: Send the byte in <a class="el" href="gb_8h.html#acae13736da20f9fc53e8d38934aa2119">_io_out</a> out through the serial port</p>
<p>Make sure to enable interrupts for the Serial Link before trying to transfer data. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ae655adc762bf0b4320d2e11d2e5fbc72">add_SIO()</a>, <a class="el" href="gb_8h.html#a325751f7e2373601d2a7a94671deef29">remove_SIO()</a> </dd>
<dd>
<a class="el" href="gb_8h.html#ae6bc65c789195b4c19ee8765b1a2aa28">set_interrupts()</a> with <a class="el" href="sms_8h.html#ad90564458646c5646b3880b93db3443e">SIO_IFLAG</a> </dd></dl>

</div>
</div>
<a id="a34d6500215984e8f9a986523a2f2dadd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34d6500215984e8f9a986523a2f2dadd">&#9670;&nbsp;</a></span>receive_byte()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void receive_byte </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Serial Link: Receive a byte from the serial port into <a class="el" href="gb_8h.html#a02f3a1585ae654444e628c1aa98ef0cf">_io_in</a></p>
<p>Make sure to enable interrupts for the Serial Link before trying to transfer data. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ae655adc762bf0b4320d2e11d2e5fbc72">add_SIO()</a>, <a class="el" href="gb_8h.html#a325751f7e2373601d2a7a94671deef29">remove_SIO()</a> </dd>
<dd>
<a class="el" href="gb_8h.html#ae6bc65c789195b4c19ee8765b1a2aa28">set_interrupts()</a> with <a class="el" href="sms_8h.html#ad90564458646c5646b3880b93db3443e">SIO_IFLAG</a> </dd></dl>

</div>
</div>
<a id="a79b9feff94d525e0237be22dcefd5850"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a79b9feff94d525e0237be22dcefd5850">&#9670;&nbsp;</a></span>delay()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void delay </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td>
          <td class="paramname"><em>d</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Delays the given number of milliseconds. Uses no timers or interrupts, and can be called with interrupts disabled </p>

</div>
</div>
<a id="a4344fefd260763e12703138066841b19"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4344fefd260763e12703138066841b19">&#9670;&nbsp;</a></span>joypad()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> joypad </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Reads and returns the current state of the joypad. Follows Nintendo's guidelines for reading the pad. Return value is an OR of J_*</p>
<p>When testing for multiple different buttons, it's best to read the joypad state <em>once</em> into a variable and then test using that variable.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ab769c6e20778298be8bc3321476ceb53">J_START</a>, <a class="el" href="gb_8h.html#ab416a9d96d1582490828f4bac78a8b5b">J_SELECT</a>, <a class="el" href="gb_8h.html#a31af766e3b598eb7a6b63f55a4988e7a">J_A</a>, <a class="el" href="gb_8h.html#ae47e59a309120f9420993f26816b5e6d">J_B</a>, <a class="el" href="gb_8h.html#a05ca817ab32f6da612c3ae26db5abf02">J_UP</a>, <a class="el" href="gb_8h.html#ae032c5c544196e37ec0432f6cfad7904">J_DOWN</a>, <a class="el" href="gb_8h.html#ac70894fecac30c1ca9917f07373cf81c">J_LEFT</a>, <a class="el" href="gb_8h.html#a3bad91d11ae09ffcbb3cb0a81873d325">J_RIGHT</a> </dd></dl>

</div>
</div>
<a id="abb680388b5bcbf0c69526d7017ffe8d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abb680388b5bcbf0c69526d7017ffe8d2">&#9670;&nbsp;</a></span>waitpad()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> waitpad </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>mask</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Waits until at least one of the buttons given in mask are pressed.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">mask</td><td>Bitmask indicating which buttons to wait for</td></tr>
  </table>
  </dd>
</dl>
<p>Normally only used for checking one key, but it will support many, even J_LEFT at the same time as J_RIGHT. :)</p>
<dl class="section note"><dt>Note</dt><dd>Checks in a loop that doesn't HALT at all, so the CPU will be maxed out until this call returns. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a4344fefd260763e12703138066841b19">joypad</a> </dd>
<dd>
<a class="el" href="gb_8h.html#ab769c6e20778298be8bc3321476ceb53">J_START</a>, <a class="el" href="gb_8h.html#ab416a9d96d1582490828f4bac78a8b5b">J_SELECT</a>, <a class="el" href="gb_8h.html#a31af766e3b598eb7a6b63f55a4988e7a">J_A</a>, <a class="el" href="gb_8h.html#ae47e59a309120f9420993f26816b5e6d">J_B</a>, <a class="el" href="gb_8h.html#a05ca817ab32f6da612c3ae26db5abf02">J_UP</a>, <a class="el" href="gb_8h.html#ae032c5c544196e37ec0432f6cfad7904">J_DOWN</a>, <a class="el" href="gb_8h.html#ac70894fecac30c1ca9917f07373cf81c">J_LEFT</a>, <a class="el" href="gb_8h.html#a3bad91d11ae09ffcbb3cb0a81873d325">J_RIGHT</a> </dd></dl>

</div>
</div>
<a id="ada353868815f4a2923812ac63aa00003"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada353868815f4a2923812ac63aa00003">&#9670;&nbsp;</a></span>waitpadup()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void waitpadup </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Waits for the directional pad and all buttons to be released.</p>
<dl class="section note"><dt>Note</dt><dd>Checks in a loop that doesn't HALT at all, so the CPU will be maxed out until this call returns. </dd></dl>

</div>
</div>
<a id="ab7e35e1eff44ed78ad8f0015c6e85b4e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab7e35e1eff44ed78ad8f0015c6e85b4e">&#9670;&nbsp;</a></span>joypad_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> joypad_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>npads</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structjoypads__t.html">joypads_t</a> *&#160;</td>
          <td class="paramname"><em>joypads</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initializes <a class="el" href="structjoypads__t.html">joypads_t</a> structure for polling multiple joypads (for the GB and ones connected via SGB) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">npads</td><td>number of joypads requested (1, 2 or 4) </td></tr>
    <tr><td class="paramname">joypads</td><td>pointer to <a class="el" href="structjoypads__t.html">joypads_t</a> structure to be initialized</td></tr>
  </table>
  </dd>
</dl>
<p>Only required for <a class="el" href="sms_8h.html#a1d45c65829490c5ec98362f5e60edc20">joypad_ex</a>, not required for calls to regular <a class="el" href="gb_8h.html#a4344fefd260763e12703138066841b19">joypad()</a> </p><dl class="section return"><dt>Returns</dt><dd>number of joypads avaliable </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ab6634cc802b70972dc0ce0961ffc9693">joypad_ex()</a>, <a class="el" href="structjoypads__t.html">joypads_t</a> </dd></dl>

</div>
</div>
<a id="ab6634cc802b70972dc0ce0961ffc9693"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab6634cc802b70972dc0ce0961ffc9693">&#9670;&nbsp;</a></span>joypad_ex()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void joypad_ex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structjoypads__t.html">joypads_t</a> *&#160;</td>
          <td class="paramname"><em>joypads</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Polls all avaliable joypads (for the GB and ones connected via SGB) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">joypads</td><td>pointer to <a class="el" href="structjoypads__t.html">joypads_t</a> structure to be filled with joypad statuses, must be previously initialized with <a class="el" href="gb_8h.html#ab7e35e1eff44ed78ad8f0015c6e85b4e">joypad_init()</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ab7e35e1eff44ed78ad8f0015c6e85b4e">joypad_init()</a>, <a class="el" href="structjoypads__t.html">joypads_t</a> </dd></dl>

</div>
</div>
<a id="aad3a9797fd6d216671b5bbaccd8a4916"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad3a9797fd6d216671b5bbaccd8a4916">&#9670;&nbsp;</a></span>enable_interrupts()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void enable_interrupts </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Enables unmasked interrupts</p>
<dl class="section note"><dt>Note</dt><dd>Use <a class="el" href="asm_2types_8h.html#ae0233515480e60d29bcc731469976e02">CRITICAL</a> {...} instead for creating a block of of code which should execute with interrupts temporarily turned off.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ae3e53d15b4fc64f43761f55c1793b490">disable_interrupts</a>, <a class="el" href="gb_8h.html#ae6bc65c789195b4c19ee8765b1a2aa28">set_interrupts</a>, <a class="el" href="asm_2types_8h.html#ae0233515480e60d29bcc731469976e02">CRITICAL</a> </dd></dl>

</div>
</div>
<a id="ae3e53d15b4fc64f43761f55c1793b490"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae3e53d15b4fc64f43761f55c1793b490">&#9670;&nbsp;</a></span>disable_interrupts()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void disable_interrupts </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Disables interrupts</p>
<dl class="section note"><dt>Note</dt><dd>Use <a class="el" href="asm_2types_8h.html#ae0233515480e60d29bcc731469976e02">CRITICAL</a> {...} instead for creating a block of of code which should execute with interrupts temporarily turned off.</dd></dl>
<p>This function may be called as many times as you like; however the first call to <a class="el" href="sms_8h.html#aad3a9797fd6d216671b5bbaccd8a4916">enable_interrupts</a> will re-enable them.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#aad3a9797fd6d216671b5bbaccd8a4916">enable_interrupts</a>, <a class="el" href="gb_8h.html#ae6bc65c789195b4c19ee8765b1a2aa28">set_interrupts</a>, <a class="el" href="asm_2types_8h.html#ae0233515480e60d29bcc731469976e02">CRITICAL</a> </dd></dl>

</div>
</div>
<a id="ae6bc65c789195b4c19ee8765b1a2aa28"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae6bc65c789195b4c19ee8765b1a2aa28">&#9670;&nbsp;</a></span>set_interrupts()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_interrupts </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>flags</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Clears any pending interrupts and sets the interrupt mask register IO to flags. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">flags</td><td>A logical OR of *_IFLAGS</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This disables and then re-enables interrupts so it must be used outside of a critical section.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#aad3a9797fd6d216671b5bbaccd8a4916">enable_interrupts()</a>, <a class="el" href="gb_8h.html#ae3e53d15b4fc64f43761f55c1793b490">disable_interrupts()</a> </dd>
<dd>
<a class="el" href="gb_8h.html#a2ca7720b9a5da9b2173e1f74dba85541">VBL_IFLAG</a>, <a class="el" href="gb_8h.html#a61a9e2910380de6abb34df14ef634eb4">LCD_IFLAG</a>, <a class="el" href="gb_8h.html#a604256210ec5b90b68185e1a18efab49">TIM_IFLAG</a>, <a class="el" href="gb_8h.html#ad90564458646c5646b3880b93db3443e">SIO_IFLAG</a>, <a class="el" href="gb_8h.html#a2f829cf27d6e3e24c875e9b82dfcb280">JOY_IFLAG</a> </dd></dl>

</div>
</div>
<a id="a3aea9deb2a0bfea9ff05a898f4822e31"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3aea9deb2a0bfea9ff05a898f4822e31">&#9670;&nbsp;</a></span>reset()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void reset </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Performs a soft reset.</p>
<p>For the Game Boy and related it does this by jumping to address 0x0150 which is in crt0.s (the c-runtime that executes before main() is called).</p>
<p>This performs various startup steps such as resetting the stack, clearing WRAM and OAM, resetting initialized variables and some display registers (scroll, window, LCDC), etc.</p>
<p>This is not the same a hard power reset. </p>

</div>
</div>
<a id="af57b77452ef377da18e4fbf0288013d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af57b77452ef377da18e4fbf0288013d1">&#9670;&nbsp;</a></span>vsync()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vsync </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>HALTs the CPU and waits for the vertical blank interrupt and then returns when all registered VBL ISRs have completed.</p>
<p>This is often used in main loops to idle the CPU at low power until it's time to start the next frame. It's also useful for syncing animation with the screen re-draw.</p>
<p>Warning: If the VBL interrupt is disabled, this function will never return. If the screen is off this function returns immediately. </p>

</div>
</div>
<a id="a815f8ecad32d14b786a8ed1168518773"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a815f8ecad32d14b786a8ed1168518773">&#9670;&nbsp;</a></span>wait_vbl_done()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wait_vbl_done </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Obsolete. This function has been replaced by <a class="el" href="gb_8h.html#af57b77452ef377da18e4fbf0288013d1">vsync()</a>, which has identical behavior. </p>

</div>
</div>
<a id="aae96812c15f9003428180ec3d0964145"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aae96812c15f9003428180ec3d0964145">&#9670;&nbsp;</a></span>display_off()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void display_off </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Turns the display off.</p>
<p>Waits until the VBL before turning the display off. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a5ae6b05b3e1559c97f0d1b2daaaa0ee4">DISPLAY_ON</a> </dd></dl>

</div>
</div>
<a id="a1ae1f52fbe4d2c2657e3d1fccc0d543c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1ae1f52fbe4d2c2657e3d1fccc0d543c">&#9670;&nbsp;</a></span>refresh_OAM()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void refresh_OAM </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copies data from shadow OAM to OAM </p>

</div>
</div>
<a id="a97b9f2fc6ac7cae97656aca940d65d44"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a97b9f2fc6ac7cae97656aca940d65d44">&#9670;&nbsp;</a></span>hiramcpy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void hiramcpy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>n</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copies data from somewhere in the lower address space to part of hi-ram. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dst</td><td>Offset in high ram (0xFF00 and above) to copy to. </td></tr>
    <tr><td class="paramname">src</td><td>Area to copy from </td></tr>
    <tr><td class="paramname">n</td><td>Number of bytes to copy. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a2a26d723b07d1a9893f57208a201df36"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2a26d723b07d1a9893f57208a201df36">&#9670;&nbsp;</a></span>set_vram_byte()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_vram_byte </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>v</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set byte in vram at given memory location</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">addr</td><td>address to write to </td></tr>
    <tr><td class="paramname">v</td><td>value </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ae32250cfb4daaa1fff7250a0e3f0ad0f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae32250cfb4daaa1fff7250a0e3f0ad0f">&#9670;&nbsp;</a></span>get_vram_byte()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> get_vram_byte </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>addr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get byte from vram at given memory location </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">addr</td><td>address to read from </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>read value</dd></dl>
<dl class="section note"><dt>Note</dt><dd>In general <b>avoid reading from VRAM</b> since that memory is not accessible at all times. It is also not supported by GBDK on the NES platform. See <a class="el" href="docs_coding_guidelines.html#best_practice_dont_read_vram">coding guidelines</a> for more details. </dd></dl>

</div>
</div>
<a id="a9005b80d3315f50f0fb0e1728e7ee60f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9005b80d3315f50f0fb0e1728e7ee60f">&#9670;&nbsp;</a></span>get_bkg_xy_addr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>* get_bkg_xy_addr </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get address of X,Y tile of background map </p>

</div>
</div>
<a id="aa224c9bac27c7fd268e62bdf33338a84"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa224c9bac27c7fd268e62bdf33338a84">&#9670;&nbsp;</a></span>set_2bpp_palette()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_2bpp_palette </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td>
          <td class="paramname"><em>palette</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets palette for 2bpp color translation for GG/SMS, does nothing on GB </p>

</div>
</div>
<a id="a1f00bd35cd56aac84c108f5a802c3f9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f00bd35cd56aac84c108f5a802c3f9c">&#9670;&nbsp;</a></span>set_1bpp_colors_ex()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_1bpp_colors_ex </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>fgcolor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>bgcolor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the Foreground and Background colors used by the set_*_1bpp_*() functions </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fgcolor</td><td>Foreground color </td></tr>
    <tr><td class="paramname">bgcolor</td><td>Background color </td></tr>
    <tr><td class="paramname">mode</td><td>Draw Mode</td></tr>
  </table>
  </dd>
</dl>
<p>See <a class="el" href="sms_8h.html#adcb394299a1033616fc7d2faec8bd6ad">set_1bpp_colors</a> for details. </p>

</div>
</div>
<a id="adcb394299a1033616fc7d2faec8bd6ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adcb394299a1033616fc7d2faec8bd6ad">&#9670;&nbsp;</a></span>set_1bpp_colors()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_1bpp_colors </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>fgcolor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>bgcolor</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets the Foreground and Background colors used by the set_*_1bpp_*() functions </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fgcolor</td><td>Foreground color to use </td></tr>
    <tr><td class="paramname">bgcolor</td><td>Background color to use</td></tr>
  </table>
  </dd>
</dl>
<p>The default colors are: </p><ul>
<li>Foreground: DMG_BLACK </li>
<li>Background: DMG_WHITE</li>
</ul>
<p>Example: </p><div class="fragment"><div class="line"><span class="comment">// Use DMG_BLACK as the Foreground color and DMG_LITE_GRAY</span></div>
<div class="line"><span class="comment">// as the Background color when loading 1bpp tile data.</span></div>
<div class="line"><a class="code" href="gb_8h.html#adcb394299a1033616fc7d2faec8bd6ad">set_1bpp_colors</a>(<a class="code" href="gb_8h.html#ab311e53739c992294ae07ca506a924ad">DMG_BLACK</a>, <a class="code" href="gb_8h.html#a8ccd6732d3bdf390cc0943e8567341f3">DMG_LITE_GRAY</a>);</div>
<div class="ttc" id="agb_8h_html_adcb394299a1033616fc7d2faec8bd6ad"><div class="ttname"><a href="gb_8h.html#adcb394299a1033616fc7d2faec8bd6ad">set_1bpp_colors</a></div><div class="ttdeci">void set_1bpp_colors(uint8_t fgcolor, uint8_t bgcolor)</div><div class="ttdef"><b>Definition:</b> gb.h:1038</div></div>
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ab311e53739c992294ae07ca506a924ad">DMG_BLACK</a>, <a class="el" href="gb_8h.html#a45d13a674e169dd83df7e1f46513ccba">DMG_DARK_GRAY</a>, <a class="el" href="gb_8h.html#a8ccd6732d3bdf390cc0943e8567341f3">DMG_LITE_GRAY</a>, <a class="el" href="gb_8h.html#a11cedc2ee58acfbbfc48dfb2b9a551b3">DMG_WHITE</a> </dd>
<dd>
<a class="el" href="gb_8h.html#a711fa26feecc76dc51482b0f77062859">set_bkg_1bpp_data</a>, <a class="el" href="gb_8h.html#acd5ee7a94059e6edbe9223f291bc2b46">set_win_1bpp_data</a>, <a class="el" href="gb_8h.html#ab3e60c92c9f8fbed855f8712187ea3ea">set_sprite_1bpp_data</a> </dd></dl>

</div>
</div>
<a id="a1f5101f2b7bb0123c26a3e257f843626"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f5101f2b7bb0123c26a3e257f843626">&#9670;&nbsp;</a></span>set_bkg_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets VRAM Tile Pattern data for the Background / Window</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first tile to write </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to (2 bpp) source tile data</td></tr>
  </table>
  </dd>
</dl>
<p>Writes <b>nb_tiles</b> tiles to VRAM starting at <b>first_tile</b>, tile data is sourced from <b>data</b>. Each Tile is 16 bytes in size (8x8 pixels, 2 bits-per-pixel).</p>
<dl class="section note"><dt>Note</dt><dd>Sprite Tiles 128-255 share the same memory region as Background Tiles 128-255.</dd></dl>
<p>GBC only: <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a> determines which bank of tile patterns are written to. </p><ul>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#ad21d032f4ab5d5cf21c4d455c4513046">VBK_BANK_0</a> indicates the first bank </li>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#afb1c02277ab645e83e2ee339e2f6a64f">VBK_BANK_1</a> indicates the second</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ac2bf0c4919c30d322fa5853c896e710f">set_win_data</a>, <a class="el" href="gb_8h.html#abe4846d4570b4880b0e54b9e503f4d30">set_tile_data</a> </dd></dl>

</div>
</div>
<a id="a711fa26feecc76dc51482b0f77062859"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a711fa26feecc76dc51482b0f77062859">&#9670;&nbsp;</a></span>set_bkg_1bpp_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_1bpp_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets VRAM Tile Pattern data for the Background / Window using 1bpp source data</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first Tile to write </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of Tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to (1bpp) source Tile Pattern data</td></tr>
  </table>
  </dd>
</dl>
<p>Similar to <a class="el" href="sms_8h.html#a8130306da1177f4fef89e699f8e2add4">set_bkg_data</a>, except source data is 1 bit-per-pixel which gets expanded into 2 bits-per-pixel.</p>
<p>For a given bit that represent a pixel: </p><ul>
<li>0 will be expanded into the Background color </li>
<li>1 will be expanded into the Foreground color</li>
</ul>
<p>See <a class="el" href="sms_8h.html#adcb394299a1033616fc7d2faec8bd6ad">set_1bpp_colors</a> for details about setting the Foreground and Background colors.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a>, <a class="el" href="gb_8h.html#a6d25f7c43b1cbbb48b95cda7ab2c3141">HIDE_BKG</a>, <a class="el" href="gb_8h.html#a6da9e2fa1bafd35363e84ee999909ec7">set_bkg_tiles</a> </dd>
<dd>
<a class="el" href="gb_8h.html#acd5ee7a94059e6edbe9223f291bc2b46">set_win_1bpp_data</a>, <a class="el" href="gb_8h.html#ab3e60c92c9f8fbed855f8712187ea3ea">set_sprite_1bpp_data</a> </dd></dl>

</div>
</div>
<a id="a5c13238dfec416439d75b133a272e6df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c13238dfec416439d75b133a272e6df">&#9670;&nbsp;</a></span>get_bkg_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void get_bkg_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copies from Background / Window VRAM Tile Pattern data into a buffer</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first Tile to read from </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of Tiles to read </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to destination buffer for Tile Pattern data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>In general <b>avoid reading from VRAM</b> since that memory is not accessible at all times. It is also not supported by GBDK on the NES platform. See <a class="el" href="docs_coding_guidelines.html#best_practice_dont_read_vram">coding guidelines</a> for more details.</dd></dl>
<p>Copies <b>nb_tiles</b> tiles from VRAM starting at <b>first_tile</b>, Tile data is copied into <b>data</b>.</p>
<p>Each Tile is 16 bytes, so the buffer pointed to by <b>data</b> should be at least <b>nb_tiles</b> x 16 bytes in size.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a7ef32e7c1669aba48f235500a495baba">get_win_data</a>, <a class="el" href="gb_8h.html#a77d34577e9f97ffaf8463c752115722b">get_data</a> </dd></dl>

</div>
</div>
<a id="a6da9e2fa1bafd35363e84ee999909ec7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6da9e2fa1bafd35363e84ee999909ec7">&#9670;&nbsp;</a></span>set_bkg_tiles()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_tiles </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>tiles</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets a rectangular region of Background Tile Map.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 1 - 32 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 1 - 32 </td></tr>
    <tr><td class="paramname">tiles</td><td>Pointer to source tile map data</td></tr>
  </table>
  </dd>
</dl>
<p>Entries are copied from map at <b>tiles</b> to the Background Tile Map starting at <b>x</b>, <b>y</b> writing across for <b>w</b> tiles and down for <b>h</b> tiles.</p>
<p>Use <a class="el" href="gb_8h.html#adb21d1c7d533a7133bab36a845489780">set_bkg_submap()</a> instead when: </p><ul>
<li>Source map is wider than 32 tiles. </li>
<li>Writing a width that does not match the source map width <b>and</b> more than one row high at a time.</li>
</ul>
<p>One byte per source tile map entry.</p>
<p>Writes that exceed coordinate 31 on the x or y axis will wrap around to the Left and Top edges.</p>
<dl class="section note"><dt>Note</dt><dd>Patterns 128-255 overlap with patterns 128-255 of the sprite Tile Pattern table.</dd></dl>
<p>GBC only: <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a> determines whether Tile Numbers or Tile Attributes get set. </p><ul>
<li>VBK_REG = <a class="el" href="sms_2hardware_8h.html#a6b6b917fd4f396ba028bb18631165781">VBK_TILES</a> Tile Numbers are written </li>
<li>VBK_REG = <a class="el" href="sms_2hardware_8h.html#a418a105f4c7d4bf1cbc556eab72c27ca">VBK_ATTRIBUTES</a> Tile Attributes are written</li>
</ul>
<p>GBC Tile Attributes are defined as: </p><ul>
<li>Bit 7 - Priority flag. When this is set, it puts the tile above the sprites with colour 0 being transparent. <br  />
 0: Below sprites <br  />
 1: Above sprites <br  />
 Note: <a class="el" href="sms_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a> needs to be set for these priorities to take place. </li>
<li>Bit 6 - Vertical flip. Dictates which way up the tile is drawn vertically. <br  />
 0: Normal <br  />
 1: Flipped Vertically </li>
<li>Bit 5 - Horizontal flip. Dictates which way up the tile is drawn horizontally. <br  />
 0: Normal <br  />
 1: Flipped Horizontally </li>
<li>Bit 4 - Not used </li>
<li>Bit 3 - Character Bank specification. Dictates from which bank of Background Tile Patterns the tile is taken. <br  />
 0: Bank 0 <br  />
 1: Bank 1 </li>
<li>Bit 2 - See bit 0. </li>
<li>Bit 1 - See bit 0. </li>
<li>Bit 0 - Bits 0-2 indicate which of the 7 BKG colour palettes the tile is assigned.</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a> </dd>
<dd>
<a class="el" href="gb_8h.html#a1f5101f2b7bb0123c26a3e257f843626">set_bkg_data</a>, <a class="el" href="gb_8h.html#adb21d1c7d533a7133bab36a845489780">set_bkg_submap</a>, <a class="el" href="gb_8h.html#a5c59b4ee6323af9832998906d087266b">set_win_tiles</a>, <a class="el" href="gb_8h.html#a6224b2e4b72c062a2bb2959b0aaf860a">set_tiles</a> </dd></dl>

</div>
</div>
<a id="a811c386cac0df2d260aacb5a43608be5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a811c386cac0df2d260aacb5a43608be5">&#9670;&nbsp;</a></span>set_bkg_based_tiles()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_based_tiles </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>base_tile</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets a rectangular region of Background Tile Map. The offset value in <b>base_tile</b> is added to the tile ID for each map entry.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 1 - 32 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 1 - 32 </td></tr>
    <tr><td class="paramname">tiles</td><td>Pointer to source tile map data </td></tr>
    <tr><td class="paramname">base_tile</td><td>Offset each tile ID entry of the source map by this value. Range 1 - 255</td></tr>
  </table>
  </dd>
</dl>
<p>This is identical to <a class="el" href="msx_8h.html#a9a732aec1b7aec7d10a9d76ca4da2064">set_bkg_tiles()</a> except that it adds the <b>base_tile</b> parameter for when a tile map's tiles don't start at index zero. (For example, the tiles used by the map range from 100 -&gt; 120 in VRAM instead of 0 -&gt; 20).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a6da9e2fa1bafd35363e84ee999909ec7">set_bkg_tiles</a> for more details </dd></dl>

</div>
</div>
<a id="a0bcf384938628c4ab52e63b2df8f78f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0bcf384938628c4ab52e63b2df8f78f8">&#9670;&nbsp;</a></span>set_bkg_attributes()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_attributes </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>tiles</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets a rectangular region of Background Tile Map Attributes.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 1 - 32 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 1 - 32 </td></tr>
    <tr><td class="paramname">tiles</td><td>Pointer to source tile map attribute data</td></tr>
  </table>
  </dd>
</dl>
<p>Entries are copied from map at <b>tiles</b> to the Background Tile Map starting at <b>x</b>, <b>y</b> writing across for <b>w</b> tiles and down for <b>h</b> tiles.</p>
<p>Use <a class="el" href="gb_8h.html#a1cefe143b3861632897e0c989401bce7">set_bkg_submap_attributes()</a> instead when: </p><ul>
<li>Source map is wider than 32 tiles. </li>
<li>Writing a width that does not match the source map width <b>and</b> more than one row high at a time.</li>
</ul>
<p>One byte per source tile map entry.</p>
<p>Writes that exceed coordinate 31 on the x or y axis will wrap around to the Left and Top edges.</p>
<p>GBC Tile Attributes are defined as: </p><ul>
<li>Bit 7 - Priority flag. When this is set, it puts the tile above the sprites with colour 0 being transparent. <br  />
 0: Below sprites <br  />
 1: Above sprites <br  />
 Note: <a class="el" href="sms_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a> needs to be set for these priorities to take place. </li>
<li>Bit 6 - Vertical flip. Dictates which way up the tile is drawn vertically. <br  />
 0: Normal <br  />
 1: Flipped Vertically </li>
<li>Bit 5 - Horizontal flip. Dictates which way up the tile is drawn horizontally. <br  />
 0: Normal <br  />
 1: Flipped Horizontally </li>
<li>Bit 4 - Not used </li>
<li>Bit 3 - Character Bank specification. Dictates from which bank of Background Tile Patterns the tile is taken. <br  />
 0: Bank 0 <br  />
 1: Bank 1 </li>
<li>Bit 2 - See bit 0. </li>
<li>Bit 1 - See bit 0. </li>
<li>Bit 0 - Bits 0-2 indicate which of the 7 BKG colour palettes the tile is assigned.</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a> </dd>
<dd>
<a class="el" href="gb_8h.html#a1f5101f2b7bb0123c26a3e257f843626">set_bkg_data</a>, <a class="el" href="gb_8h.html#a1cefe143b3861632897e0c989401bce7">set_bkg_submap_attributes</a>, <a class="el" href="gb_8h.html#a5c59b4ee6323af9832998906d087266b">set_win_tiles</a>, <a class="el" href="gb_8h.html#a6224b2e4b72c062a2bb2959b0aaf860a">set_tiles</a></dd></dl>
<dl class="section note"><dt>Note</dt><dd>On the Game Boy this is only usable in Game Boy Color mode </dd></dl>

</div>
</div>
<a id="adb21d1c7d533a7133bab36a845489780"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adb21d1c7d533a7133bab36a845489780">&#9670;&nbsp;</a></span>set_bkg_submap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_submap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>map</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>map_w</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets a rectangular area of the Background Tile Map using a sub-region from a source tile map. Useful for scrolling implementations of maps larger than 32 x 32 tiles.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in both the Source Tile Map and hardware Background Map tile coordinates. Range 0 - 255 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in both the Source Tile Map and hardware Background Map tile coordinates. Range 0 - 255 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 1 - 255 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 1 - 255 </td></tr>
    <tr><td class="paramname">map</td><td>Pointer to source tile map data </td></tr>
    <tr><td class="paramname">map_w</td><td>Width of source tile map in tiles. Range 1 - 255</td></tr>
  </table>
  </dd>
</dl>
<p>Entries are copied from <b>map</b> to the Background Tile Map starting at <b>x</b>, <b>y</b> writing across for <b>w</b> tiles and down for <b>h</b> tiles, using <b>map_w</b> as the rowstride for the source tile map.</p>
<p>The <b>x</b> and <b>y</b> parameters are in Source Tile Map tile coordinates. The location tiles will be written to on the hardware Background Map is derived from those, but only uses the lower 5 bits of each axis, for range of 0-31 (they are bit-masked: <code>x &amp; 0x1F</code> and <code>y &amp; 0x1F</code>). As a result the two coordinate systems are aligned together.</p>
<p>In order to transfer tile map data in a way where the coordinate systems are not aligned, an offset from the Source Tile Map pointer can be passed in: <code>(map_ptr + x + (y * map_width))</code>.</p>
<p>For example, if you want the tile id at <code>1,2</code> from the source map to show up at <code>0,0</code> on the hardware Background Map (instead of at <code>1,2</code>) then modify the pointer address that is passed in: <code>map_ptr + 1 + (2 * map_width)</code></p>
<p>Use this instead of <a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a> when the source map is wider than 32 tiles or when writing a width that does not match the source map width.</p>
<p>One byte per source tile map entry.</p>
<p>Writes that exceed coordinate 31 on the x or y axis will wrap around to the Left and Top edges.</p>
<p>See <a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a> for setting CGB attribute maps with <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a> </dd>
<dd>
<a class="el" href="gb_8h.html#a1f5101f2b7bb0123c26a3e257f843626">set_bkg_data</a>, <a class="el" href="gb_8h.html#a6da9e2fa1bafd35363e84ee999909ec7">set_bkg_tiles</a>, <a class="el" href="gb_8h.html#af80befa3cad9cae361c7cf4fffb3a8de">set_win_submap</a>, <a class="el" href="gb_8h.html#a6224b2e4b72c062a2bb2959b0aaf860a">set_tiles</a> </dd></dl>

</div>
</div>
<a id="abc8bc5808620a9717263b8c9ec2237f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abc8bc5808620a9717263b8c9ec2237f0">&#9670;&nbsp;</a></span>set_bkg_based_submap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_based_submap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>map</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>map_w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>base_tile</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets a rectangular area of the Background Tile Map using a sub-region from a source tile map. The offset value in <b>base_tile</b> is added to the tile ID for each map entry.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in both the Source Tile Map and hardware Background Map tile coordinates. Range 0 - 255 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in both the Source Tile Map and hardware Background Map tile coordinates. Range 0 - 255 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 1 - 255 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 1 - 255 </td></tr>
    <tr><td class="paramname">map</td><td>Pointer to source tile map data </td></tr>
    <tr><td class="paramname">map_w</td><td>Width of source tile map in tiles. Range 1 - 255 </td></tr>
    <tr><td class="paramname">base_tile</td><td>Offset each tile ID entry of the source map by this value. Range 1 - 255</td></tr>
  </table>
  </dd>
</dl>
<p>This is identical to <a class="el" href="gb_8h.html#adb21d1c7d533a7133bab36a845489780">set_bkg_submap()</a> except that it adds the <b>base_tile</b> parameter for when a tile map's tiles don't start at index zero. (For example, the tiles used by the map range from 100 -&gt; 120 in VRAM instead of 0 -&gt; 20).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#adb21d1c7d533a7133bab36a845489780">set_bkg_submap</a> for more details </dd></dl>

</div>
</div>
<a id="a1cefe143b3861632897e0c989401bce7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1cefe143b3861632897e0c989401bce7">&#9670;&nbsp;</a></span>set_bkg_submap_attributes()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_submap_attributes </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>map</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>map_w</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets a rectangular area of the Background Tile Map Attributes using a sub-region from a source tile attribute map. Useful for scrolling implementations of maps larger than 32 x 32 tiles.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in both the Source Tile Map and hardware Background Map tile coordinates. Range 0 - 255 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in both the Source Tile Map and hardware Background Map tile coordinates. Range 0 - 255 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 1 - 255 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 1 - 255 </td></tr>
    <tr><td class="paramname">map</td><td>Pointer to source tile map attribute data </td></tr>
    <tr><td class="paramname">map_w</td><td>Width of source tile map in tiles. Range 1 - 255</td></tr>
  </table>
  </dd>
</dl>
<p>Entries are copied from <b>map</b> to the Background Tile Map starting at <b>x</b>, <b>y</b> writing across for <b>w</b> tiles and down for <b>h</b> tiles, using <b>map_w</b> as the rowstride for the source tile map.</p>
<p>The <b>x</b> and <b>y</b> parameters are in Source Tile Map tile coordinates. The location tiles will be written to on the hardware Background Map is derived from those, but only uses the lower 5 bits of each axis, for range of 0-31 (they are bit-masked: <code>x &amp; 0x1F</code> and <code>y &amp; 0x1F</code>). As a result the two coordinate systems are aligned together.</p>
<p>In order to transfer tile map data in a way where the coordinate systems are not aligned, an offset from the Source Tile Map pointer can be passed in: <code>(map_ptr + x + (y * map_width))</code>.</p>
<p>For example, if you want the tile id at <code>1,2</code> from the source map to show up at <code>0,0</code> on the hardware Background Map (instead of at <code>1,2</code>) then modify the pointer address that is passed in: <code>map_ptr + 1 + (2 * map_width)</code></p>
<p>Use this instead of <a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a> when the source map is wider than 32 tiles or when writing a width that does not match the source map width.</p>
<p>One byte per source tile map entry.</p>
<p>Writes that exceed coordinate 31 on the x or y axis will wrap around to the Left and Top edges.</p>
<p>See <a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a> for setting CGB attribute maps with <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a> </dd>
<dd>
<a class="el" href="gb_8h.html#a1f5101f2b7bb0123c26a3e257f843626">set_bkg_data</a>, <a class="el" href="gb_8h.html#a0bcf384938628c4ab52e63b2df8f78f8">set_bkg_attributes</a>, <a class="el" href="gb_8h.html#af80befa3cad9cae361c7cf4fffb3a8de">set_win_submap</a>, <a class="el" href="gb_8h.html#a6224b2e4b72c062a2bb2959b0aaf860a">set_tiles</a></dd></dl>
<dl class="section note"><dt>Note</dt><dd>On the Game Boy this is only usable in Game Boy Color mode </dd></dl>

</div>
</div>
<a id="aa6bcf24d97f93307b30f2906251f39a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa6bcf24d97f93307b30f2906251f39a0">&#9670;&nbsp;</a></span>get_bkg_tiles()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void get_bkg_tiles </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>tiles</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copies a rectangular region of Background Tile Map entries into a buffer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to copy in tiles. Range 0 - 31 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to copy in tiles. Range 0 - 31 </td></tr>
    <tr><td class="paramname">tiles</td><td>Pointer to destination buffer for Tile Map data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>In general <b>avoid reading from VRAM</b> since that memory is not accessible at all times. It is also not supported by GBDK on the NES platform. See <a class="el" href="docs_coding_guidelines.html#best_practice_dont_read_vram">coding guidelines</a> for more details.</dd></dl>
<p>Entries are copied into <b>tiles</b> from the Background Tile Map starting at <b>x</b>, <b>y</b> reading across for <b>w</b> tiles and down for <b>h</b> tiles.</p>
<p>One byte per tile.</p>
<p>The buffer pointed to by <b>tiles</b> should be at least <b>x</b> x <b>y</b> bytes in size.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a8a469de4c6640f921254b336b5a6191a">get_win_tiles</a>, <a class="el" href="gb_8h.html#a55c6581dbe9300dc6df41730f090af51">get_bkg_tile_xy</a>, <a class="el" href="gb_8h.html#af9830fb188433cb0305c2cefb8f8ab11">get_tiles</a>, <a class="el" href="gb_8h.html#ae32250cfb4daaa1fff7250a0e3f0ad0f">get_vram_byte</a> </dd></dl>

</div>
</div>
<a id="aaad2823459f54a08a18be59d4c3d63d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaad2823459f54a08a18be59d4c3d63d8">&#9670;&nbsp;</a></span>set_bkg_tile_xy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>* set_bkg_tile_xy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>t</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set single tile t on background layer at x,y </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X-coordinate </td></tr>
    <tr><td class="paramname">y</td><td>Y-coordinate </td></tr>
    <tr><td class="paramname">t</td><td>tile index</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>returns the address of tile, so you may use faster <a class="el" href="gb_8h.html#a2a26d723b07d1a9893f57208a201df36">set_vram_byte()</a> later </dd></dl>

</div>
</div>
<a id="a3dcce95daec5b42fc14a8938ef2cf503"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3dcce95daec5b42fc14a8938ef2cf503">&#9670;&nbsp;</a></span>set_bkg_attribute_xy()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>* set_bkg_attribute_xy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Set single attribute data a on background layer at x,y </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X-coordinate </td></tr>
    <tr><td class="paramname">y</td><td>Y-coordinate </td></tr>
    <tr><td class="paramname">a</td><td>tile attributes </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>returns the address of tile attribute, so you may use faster <a class="el" href="gb_8h.html#a2a26d723b07d1a9893f57208a201df36">set_vram_byte()</a> later</dd></dl>
<dl class="section note"><dt>Note</dt><dd>On the Game Boy this is only usable in Game Boy Color mode </dd></dl>

</div>
</div>
<a id="a55c6581dbe9300dc6df41730f090af51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a55c6581dbe9300dc6df41730f090af51">&#9670;&nbsp;</a></span>get_bkg_tile_xy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> get_bkg_tile_xy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get single tile t on background layer at x,y </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X-coordinate </td></tr>
    <tr><td class="paramname">y</td><td>Y-coordinate</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>returns tile index</dd></dl>
<dl class="section note"><dt>Note</dt><dd>In general <b>avoid reading from VRAM</b> since that memory is not accessible at all times. It is also not supported by GBDK on the NES platform. See <a class="el" href="docs_coding_guidelines.html#best_practice_dont_read_vram">coding guidelines</a> for more details. </dd></dl>

</div>
</div>
<a id="a6261537edc74068e3f7f057e6a3e8a57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6261537edc74068e3f7f057e6a3e8a57">&#9670;&nbsp;</a></span>move_bkg()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void move_bkg </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Moves the Background Layer to the position specified in <b>x</b> and <b>y</b> in pixels.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X axis screen coordinate for Left edge of the Background </td></tr>
    <tr><td class="paramname">y</td><td>Y axis screen coordinate for Top edge of the Background</td></tr>
  </table>
  </dd>
</dl>
<p>0,0 is the top left corner of the GB screen. The Background Layer wraps around the screen, so when part of it goes off the screen it appears on the opposite side (factoring in the larger size of the Background Layer versus the screen size).</p>
<p>The background layer is always under the Window Layer.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a8e3f36aa68ac036695816757f2a1322c">SHOW_BKG</a>, <a class="el" href="gb_8h.html#a6d25f7c43b1cbbb48b95cda7ab2c3141">HIDE_BKG</a> </dd></dl>

</div>
</div>
<a id="a1f583f7a880daa6145ca78b086a209d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f583f7a880daa6145ca78b086a209d1">&#9670;&nbsp;</a></span>scroll_bkg()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void scroll_bkg </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Moves the Background relative to it's current position.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>Number of pixels to move the Background on the <b>X axis</b> <br  />
 Range: -128 - 127 </td></tr>
    <tr><td class="paramname">y</td><td>Number of pixels to move the Background on the <b>Y axis</b> <br  />
 Range: -128 - 127</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a6261537edc74068e3f7f057e6a3e8a57">move_bkg</a> </dd></dl>

</div>
</div>
<a id="aa8213cfad631865e3b6faec18e772cb4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8213cfad631865e3b6faec18e772cb4">&#9670;&nbsp;</a></span>get_win_xy_addr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>* get_win_xy_addr </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get address of X,Y tile of window map </p>

</div>
</div>
<a id="ac2bf0c4919c30d322fa5853c896e710f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac2bf0c4919c30d322fa5853c896e710f">&#9670;&nbsp;</a></span>set_win_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_win_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets VRAM Tile Pattern data for the Window / Background</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first tile to write </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to (2 bpp) source Tile Pattern data.</td></tr>
  </table>
  </dd>
</dl>
<p>This is the same as <a class="el" href="sms_8h.html#a8130306da1177f4fef89e699f8e2add4">set_bkg_data</a>, since the Window Layer and Background Layer share the same Tile pattern data.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a1f5101f2b7bb0123c26a3e257f843626">set_bkg_data</a> </dd>
<dd>
<a class="el" href="gb_8h.html#a5c59b4ee6323af9832998906d087266b">set_win_tiles</a>, <a class="el" href="gb_8h.html#a1f5101f2b7bb0123c26a3e257f843626">set_bkg_data</a>, <a class="el" href="gb_8h.html#a6148e40610bc542991df842c6b19e4c9">set_data</a> </dd>
<dd>
<a class="el" href="gb_8h.html#ab19da2ab719bb8897bc0843a84af28f8">SHOW_WIN</a>, <a class="el" href="gb_8h.html#aedb6e32c42d4b1d25ad11adccd7100c3">HIDE_WIN</a> </dd></dl>

</div>
</div>
<a id="acd5ee7a94059e6edbe9223f291bc2b46"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acd5ee7a94059e6edbe9223f291bc2b46">&#9670;&nbsp;</a></span>set_win_1bpp_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_win_1bpp_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets VRAM Tile Pattern data for the Window / Background using 1bpp source data</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first tile to write </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to (1bpp) source Tile Pattern data</td></tr>
  </table>
  </dd>
</dl>
<p>This is the same as <a class="el" href="sms_8h.html#a4d5f74eed0489ebfdc2410ee3f9f7f04">set_bkg_1bpp_data</a>, since the Window Layer and Background Layer share the same Tile pattern data.</p>
<p>For a given bit that represent a pixel: </p><ul>
<li>0 will be expanded into the Background color </li>
<li>1 will be expanded into the Foreground color</li>
</ul>
<p>See <a class="el" href="sms_8h.html#adcb394299a1033616fc7d2faec8bd6ad">set_1bpp_colors</a> for details about setting the Foreground and Background colors.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a1f5101f2b7bb0123c26a3e257f843626">set_bkg_data</a>, <a class="el" href="gb_8h.html#ac2bf0c4919c30d322fa5853c896e710f">set_win_data</a>, <a class="el" href="gb_8h.html#adcb394299a1033616fc7d2faec8bd6ad">set_1bpp_colors</a> </dd>
<dd>
<a class="el" href="gb_8h.html#a711fa26feecc76dc51482b0f77062859">set_bkg_1bpp_data</a>, <a class="el" href="gb_8h.html#ab3e60c92c9f8fbed855f8712187ea3ea">set_sprite_1bpp_data</a> </dd></dl>

</div>
</div>
<a id="a7ef32e7c1669aba48f235500a495baba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7ef32e7c1669aba48f235500a495baba">&#9670;&nbsp;</a></span>get_win_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void get_win_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copies from Window / Background VRAM Tile Pattern data into a buffer</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first Tile to read from </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of Tiles to read </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to destination buffer for Tile Pattern Data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>In general <b>avoid reading from VRAM</b> since that memory is not accessible at all times. It is also not supported by GBDK on the NES platform. See <a class="el" href="docs_coding_guidelines.html#best_practice_dont_read_vram">coding guidelines</a> for more details.</dd></dl>
<p>This is the same as <a class="el" href="gb_8h.html#a5c13238dfec416439d75b133a272e6df">get_bkg_data</a>, since the Window Layer and Background Layer share the same Tile pattern data.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a5c13238dfec416439d75b133a272e6df">get_bkg_data</a>, <a class="el" href="gb_8h.html#a77d34577e9f97ffaf8463c752115722b">get_data</a> </dd></dl>

</div>
</div>
<a id="a5c59b4ee6323af9832998906d087266b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c59b4ee6323af9832998906d087266b">&#9670;&nbsp;</a></span>set_win_tiles()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_win_tiles </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>tiles</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets a rectangular region of the Window Tile Map.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in Window Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in Window Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 1 - 32 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 1 - 32 </td></tr>
    <tr><td class="paramname">tiles</td><td>Pointer to source tile map data</td></tr>
  </table>
  </dd>
</dl>
<p>Entries are copied from map at <b>tiles</b> to the Window Tile Map starting at <b>x</b>, <b>y</b> writing across for <b>w</b> tiles and down for <b>h</b> tiles.</p>
<p>Use <a class="el" href="gb_8h.html#af80befa3cad9cae361c7cf4fffb3a8de">set_win_submap()</a> instead when: </p><ul>
<li>Source map is wider than 32 tiles. </li>
<li>Writing a width that does not match the source map width <b>and</b> more than one row high at a time.</li>
</ul>
<p>One byte per source tile map entry.</p>
<p>Writes that exceed coordinate 31 on the x or y axis will wrap around to the Left and Top edges.</p>
<dl class="section note"><dt>Note</dt><dd>Patterns 128-255 overlap with patterns 128-255 of the sprite Tile Pattern table.</dd></dl>
<p>GBC only: <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a> determines whether Tile Numbers or Tile Attributes get set. </p><ul>
<li>VBK_REG = <a class="el" href="sms_2hardware_8h.html#a6b6b917fd4f396ba028bb18631165781">VBK_TILES</a> Tile Numbers are written </li>
<li>VBK_REG = <a class="el" href="sms_2hardware_8h.html#a418a105f4c7d4bf1cbc556eab72c27ca">VBK_ATTRIBUTES</a> Tile Attributes are written</li>
</ul>
<p>For more details about GBC Tile Attributes see <a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ab19da2ab719bb8897bc0843a84af28f8">SHOW_WIN</a>, <a class="el" href="gb_8h.html#aedb6e32c42d4b1d25ad11adccd7100c3">HIDE_WIN</a>, <a class="el" href="gb_8h.html#af80befa3cad9cae361c7cf4fffb3a8de">set_win_submap</a>, <a class="el" href="gb_8h.html#a6da9e2fa1bafd35363e84ee999909ec7">set_bkg_tiles</a>, <a class="el" href="gb_8h.html#a1f5101f2b7bb0123c26a3e257f843626">set_bkg_data</a>, <a class="el" href="gb_8h.html#a6224b2e4b72c062a2bb2959b0aaf860a">set_tiles</a> </dd></dl>

</div>
</div>
<a id="a739a212609ae60c9c56c095f96b4ea80"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a739a212609ae60c9c56c095f96b4ea80">&#9670;&nbsp;</a></span>set_win_based_tiles()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_win_based_tiles </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>base_tile</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets a rectangular region of the Window Tile Map. The offset value in <b>base_tile</b> is added to the tile ID for each map entry.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in Window Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in Window Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 1 - 32 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 1 - 32 </td></tr>
    <tr><td class="paramname">tiles</td><td>Pointer to source tile map data </td></tr>
    <tr><td class="paramname">base_tile</td><td>Offset each tile ID entry of the source map by this value. Range 1 - 255</td></tr>
  </table>
  </dd>
</dl>
<p>This is identical to <a class="el" href="msx_8h.html#a429db030287423012f40a6dca81ae7e3">set_win_tiles()</a> except that it adds the <b>base_tile</b> parameter for when a tile map's tiles don't start at index zero. (For example, the tiles used by the map range from 100 -&gt; 120 in VRAM instead of 0 -&gt; 20).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a5c59b4ee6323af9832998906d087266b">set_win_tiles</a> for more details </dd></dl>

</div>
</div>
<a id="af80befa3cad9cae361c7cf4fffb3a8de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af80befa3cad9cae361c7cf4fffb3a8de">&#9670;&nbsp;</a></span>set_win_submap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_win_submap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>map</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>map_w</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets a rectangular area of the Window Tile Map using a sub-region from a source tile map.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in both the Source Tile Map and hardware Window Map tile coordinates. Range 0 - 255 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in both the Source Tile Map and hardware Window Map tile coordinates. Range 0 - 255 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 1 - 255 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 1 - 255 </td></tr>
    <tr><td class="paramname">map</td><td>Pointer to source tile map data </td></tr>
    <tr><td class="paramname">map_w</td><td>Width of source tile map in tiles. Range 1 - 255</td></tr>
  </table>
  </dd>
</dl>
<p>Entries are copied from <b>map</b> to the Window Tile Map starting at <b>x</b>, <b>y</b> writing across for <b>w</b> tiles and down for <b>h</b> tiles, using <b>map_w</b> as the rowstride for the source tile map.</p>
<p>The <b>x</b> and <b>y</b> parameters are in Source Tile Map tile coordinates. The location tiles will be written to on the hardware Background Map is derived from those, but only uses the lower 5 bits of each axis, for range of 0-31 (they are bit-masked: <code>x &amp; 0x1F</code> and <code>y &amp; 0x1F</code>). As a result the two coordinate systems are aligned together.</p>
<p>In order to transfer tile map data in a way where the coordinate systems are not aligned, an offset from the Source Tile Map pointer can be passed in: <code>(map_ptr + x + (y * map_width))</code>.</p>
<p>For example, if you want the tile id at <code>1,2</code> from the source map to show up at <code>0,0</code> on the hardware Background Map (instead of at <code>1,2</code>) then modify the pointer address that is passed in: <code>map_ptr + 1 + (2 * map_width)</code></p>
<p>Use this instead of <a class="el" href="gb_8h.html#a5c59b4ee6323af9832998906d087266b">set_win_tiles</a> when the source map is wider than 32 tiles or when writing a width that does not match the source map width.</p>
<p>One byte per source tile map entry.</p>
<p>Writes that exceed coordinate 31 on the x or y axis will wrap around to the Left and Top edges.</p>
<p>GBC only: <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a> determines whether Tile Numbers or Tile Attributes get set. </p><ul>
<li>VBK_REG = <a class="el" href="sms_2hardware_8h.html#a6b6b917fd4f396ba028bb18631165781">VBK_TILES</a> Tile Numbers are written </li>
<li>VBK_REG = <a class="el" href="sms_2hardware_8h.html#a418a105f4c7d4bf1cbc556eab72c27ca">VBK_ATTRIBUTES</a> Tile Attributes are written</li>
</ul>
<p>See <a class="el" href="nes_8h.html#a6ab3fa75195d44d8d7e867d4a4cb1131">set_bkg_tiles</a> for details about CGB attribute maps with <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ab19da2ab719bb8897bc0843a84af28f8">SHOW_WIN</a>, <a class="el" href="gb_8h.html#aedb6e32c42d4b1d25ad11adccd7100c3">HIDE_WIN</a>, <a class="el" href="gb_8h.html#a5c59b4ee6323af9832998906d087266b">set_win_tiles</a>, <a class="el" href="gb_8h.html#adb21d1c7d533a7133bab36a845489780">set_bkg_submap</a>, <a class="el" href="gb_8h.html#a6da9e2fa1bafd35363e84ee999909ec7">set_bkg_tiles</a>, <a class="el" href="gb_8h.html#a1f5101f2b7bb0123c26a3e257f843626">set_bkg_data</a>, <a class="el" href="gb_8h.html#a6224b2e4b72c062a2bb2959b0aaf860a">set_tiles</a> </dd></dl>

</div>
</div>
<a id="a1b8a1026983cb2b2c0bd46334b4692a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b8a1026983cb2b2c0bd46334b4692a0">&#9670;&nbsp;</a></span>set_win_based_submap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_win_based_submap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>map</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>map_w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>base_tile</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets a rectangular area of the Window Tile Map using a sub-region from a source tile map. The offset value in <b>base_tile</b> is added to the tile ID for each map entry.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in both the Source Tile Map and hardware Window Map tile coordinates. Range 0 - 255 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in both the Source Tile Map and hardware Window Map tile coordinates. Range 0 - 255 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 1 - 255 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 1 - 255 </td></tr>
    <tr><td class="paramname">map</td><td>Pointer to source tile map data </td></tr>
    <tr><td class="paramname">map_w</td><td>Width of source tile map in tiles. Range 1 - 255 </td></tr>
    <tr><td class="paramname">base_tile</td><td>Offset each tile ID entry of the source map by this value. Range 1 - 255</td></tr>
  </table>
  </dd>
</dl>
<p>This is identical to <a class="el" href="gb_8h.html#af80befa3cad9cae361c7cf4fffb3a8de">set_win_submap()</a> except that it adds the <b>base_tile</b> parameter for when a tile map's tiles don't start at index zero. (For example, the tiles used by the map range from 100 -&gt; 120 in VRAM instead of 0 -&gt; 20).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#af80befa3cad9cae361c7cf4fffb3a8de">set_win_submap</a> for more details </dd></dl>

</div>
</div>
<a id="a8a469de4c6640f921254b336b5a6191a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8a469de4c6640f921254b336b5a6191a">&#9670;&nbsp;</a></span>get_win_tiles()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void get_win_tiles </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>tiles</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copies a rectangular region of Window Tile Map entries into a buffer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in Window Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in Window Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to copy in tiles. Range 0 - 31 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to copy in tiles. Range 0 - 31 </td></tr>
    <tr><td class="paramname">tiles</td><td>Pointer to destination buffer for Tile Map data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>In general <b>avoid reading from VRAM</b> since that memory is not accessible at all times. It is also not supported by GBDK on the NES platform. See <a class="el" href="docs_coding_guidelines.html#best_practice_dont_read_vram">coding guidelines</a> for more details.</dd></dl>
<p>Entries are copied into <b>tiles</b> from the Window Tile Map starting at <b>x</b>, <b>y</b> reading across for <b>w</b> tiles and down for <b>h</b> tiles.</p>
<p>One byte per tile.</p>
<p>The buffer pointed to by <b>tiles</b> should be at least <b>x</b> x <b>y</b> bytes in size.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#aa6bcf24d97f93307b30f2906251f39a0">get_bkg_tiles</a>, <a class="el" href="gb_8h.html#a55c6581dbe9300dc6df41730f090af51">get_bkg_tile_xy</a>, <a class="el" href="gb_8h.html#af9830fb188433cb0305c2cefb8f8ab11">get_tiles</a>, <a class="el" href="gb_8h.html#ae32250cfb4daaa1fff7250a0e3f0ad0f">get_vram_byte</a> </dd></dl>

</div>
</div>
<a id="ac46f5cb1264dc3948c6e339859f5106c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac46f5cb1264dc3948c6e339859f5106c">&#9670;&nbsp;</a></span>set_win_tile_xy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>* set_win_tile_xy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>t</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Set single tile t on window layer at x,y </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X-coordinate </td></tr>
    <tr><td class="paramname">y</td><td>Y-coordinate </td></tr>
    <tr><td class="paramname">t</td><td>tile index </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>returns the address of tile, so you may use faster <a class="el" href="gb_8h.html#a2a26d723b07d1a9893f57208a201df36">set_vram_byte()</a> later </dd></dl>

</div>
</div>
<a id="a2e29fdca81c28c627c2591029722e71c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e29fdca81c28c627c2591029722e71c">&#9670;&nbsp;</a></span>get_win_tile_xy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> get_win_tile_xy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get single tile t on window layer at x,y </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X-coordinate </td></tr>
    <tr><td class="paramname">y</td><td>Y-coordinate </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>returns the tile index</dd></dl>
<dl class="section note"><dt>Note</dt><dd>In general <b>avoid reading from VRAM</b> since that memory is not accessible at all times. It is also not supported by GBDK on the NES platform. See <a class="el" href="docs_coding_guidelines.html#best_practice_dont_read_vram">coding guidelines</a> for more details. </dd></dl>

</div>
</div>
<a id="aeef17768c494bcd6b67f7591329f7ff5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeef17768c494bcd6b67f7591329f7ff5">&#9670;&nbsp;</a></span>move_win()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void move_win </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Moves the Window to the <b>x</b>, <b>y</b> position on the screen.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X coordinate for Left edge of the Window (actual displayed location will be X - 7) </td></tr>
    <tr><td class="paramname">y</td><td>Y coordinate for Top edge of the Window</td></tr>
  </table>
  </dd>
</dl>
<p>7,0 is the top left corner of the screen in Window coordinates. The Window is locked to the bottom right corner.</p>
<p>The Window is always over the Background layer.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ab19da2ab719bb8897bc0843a84af28f8">SHOW_WIN</a>, <a class="el" href="gb_8h.html#aedb6e32c42d4b1d25ad11adccd7100c3">HIDE_WIN</a> </dd></dl>

</div>
</div>
<a id="a12c2b5ac249d01caf1561cbbf3962044"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a12c2b5ac249d01caf1561cbbf3962044">&#9670;&nbsp;</a></span>scroll_win()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void scroll_win </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Move the Window relative to its current position.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>Number of pixels to move the window on the <b>X axis</b> <br  />
 Range: -128 - 127 </td></tr>
    <tr><td class="paramname">y</td><td>Number of pixels to move the window on the <b>Y axis</b> <br  />
 Range: -128 - 127</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#aeef17768c494bcd6b67f7591329f7ff5">move_win</a> </dd></dl>

</div>
</div>
<a id="ae45b1c639698951b47e44fa8e89556f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae45b1c639698951b47e44fa8e89556f2">&#9670;&nbsp;</a></span>set_sprite_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_sprite_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets VRAM Tile Pattern data for Sprites</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first tile to write </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to (2 bpp) source Tile Pattern data</td></tr>
  </table>
  </dd>
</dl>
<p>Writes <b>nb_tiles</b> tiles to VRAM starting at <b>first_tile</b>, tile data is sourced from <b>data</b>. Each Tile is 16 bytes in size (8x8 pixels, 2 bits-per-pixel).</p>
<dl class="section note"><dt>Note</dt><dd>Sprite Tiles 128-255 share the same memory region as Background Tiles 128-255.</dd></dl>
<p>GBC only: <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a> determines which bank of tile patterns are written to. </p><ul>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#ad21d032f4ab5d5cf21c4d455c4513046">VBK_BANK_0</a> indicates the first bank </li>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#afb1c02277ab645e83e2ee339e2f6a64f">VBK_BANK_1</a> indicates the second </li>
</ul>

</div>
</div>
<a id="ab3e60c92c9f8fbed855f8712187ea3ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab3e60c92c9f8fbed855f8712187ea3ea">&#9670;&nbsp;</a></span>set_sprite_1bpp_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_sprite_1bpp_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets VRAM Tile Pattern data for Sprites using 1bpp source data</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first tile to write </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to (1bpp) source Tile Pattern data</td></tr>
  </table>
  </dd>
</dl>
<p>Similar to <a class="el" href="sms_8h.html#a216a3e3d320ee4d8cf4845600487ae39">set_sprite_data</a>, except source data is 1 bit-per-pixel which gets expanded into 2 bits-per-pixel.</p>
<p>For a given bit that represent a pixel: </p><ul>
<li>0 will be expanded into the Background color </li>
<li>1 will be expanded into the Foreground color</li>
</ul>
<p>See <a class="el" href="sms_8h.html#adcb394299a1033616fc7d2faec8bd6ad">set_1bpp_colors</a> for details about setting the Foreground and Background colors.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a495bc9f405f916f02ad5d97e6e730134">SHOW_SPRITES</a>, <a class="el" href="gb_8h.html#a69ef98aee664b8abd8d1a3d45f016dda">HIDE_SPRITES</a>, <a class="el" href="gb_8h.html#a05bf0b9f1328de7b568a19a2a428bcfe">set_sprite_tile</a> </dd>
<dd>
<a class="el" href="gb_8h.html#a711fa26feecc76dc51482b0f77062859">set_bkg_1bpp_data</a>, <a class="el" href="gb_8h.html#acd5ee7a94059e6edbe9223f291bc2b46">set_win_1bpp_data</a> </dd></dl>

</div>
</div>
<a id="adcdec4034a14abc5be9bb88c29b947c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adcdec4034a14abc5be9bb88c29b947c9">&#9670;&nbsp;</a></span>get_sprite_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void get_sprite_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copies from Sprite VRAM Tile Pattern data into a buffer</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first tile to read from </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of tiles to read </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to destination buffer for Tile Pattern data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>In general <b>avoid reading from VRAM</b> since that memory is not accessible at all times. It is also not supported by GBDK on the NES platform. See <a class="el" href="docs_coding_guidelines.html#best_practice_dont_read_vram">coding guidelines</a> for more details.</dd></dl>
<p>Copies <b>nb_tiles</b> tiles from VRAM starting at <b>first_tile</b>, tile data is copied into <b>data</b>.</p>
<p>Each Tile is 16 bytes, so the buffer pointed to by <b>data</b> should be at least <b>nb_tiles</b> x 16 bytes in size. </p>

</div>
</div>
<a id="a7e0cdfd6b9a2ae1b7f30384f132d8687"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e0cdfd6b9a2ae1b7f30384f132d8687">&#9670;&nbsp;</a></span>SET_SHADOW_OAM_ADDRESS()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SET_SHADOW_OAM_ADDRESS </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>address</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Enable OAM DMA copy each VBlank and set it to transfer any 256-byte aligned array </p>

</div>
</div>
<a id="a05bf0b9f1328de7b568a19a2a428bcfe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05bf0b9f1328de7b568a19a2a428bcfe">&#9670;&nbsp;</a></span>set_sprite_tile()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_sprite_tile </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>tile</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets sprite number <b>nb__in the OAM to display tile number __tile</b>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 39 </td></tr>
    <tr><td class="paramname">tile</td><td>Selects a tile (0 - 255) from memory at 8000h - 8FFFh <br  />
 In CGB Mode this could be either in VRAM Bank <br  />
 0 or 1, depending on Bit 3 of the OAM Attribute Flag <br  />
 (see <a class="el" href="sms_8h.html#a99ea3252469e3614e977cce2aa1d06f7">set_sprite_prop</a>)</td></tr>
  </table>
  </dd>
</dl>
<p>In 8x16 mode: </p><ul>
<li>The sprite will also display the next tile (<b>tile</b> + 1) directly below (y + 8) the first tile. </li>
<li>The lower bit of the tile number is ignored: the upper 8x8 tile is (<b>tile</b> &amp; 0xFE), and the lower 8x8 tile is (<b>tile</b> | 0x01). </li>
<li>See: <a class="el" href="sms_8h.html#af91d252f07f4764996154820f970c101">SPRITES_8x16</a> </li>
</ul>

</div>
</div>
<a id="af5c0beff7d7a7d8641b51fd95c811b2a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af5c0beff7d7a7d8641b51fd95c811b2a">&#9670;&nbsp;</a></span>get_sprite_tile()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> get_sprite_tile </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the tile number of sprite number <b>nb</b> in the OAM.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 39</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a05bf0b9f1328de7b568a19a2a428bcfe">set_sprite_tile</a> for more details </dd></dl>

</div>
</div>
<a id="a99ea3252469e3614e977cce2aa1d06f7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a99ea3252469e3614e977cce2aa1d06f7">&#9670;&nbsp;</a></span>set_sprite_prop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_sprite_prop </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>prop</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets the OAM Property Flags of sprite number <b>nb</b> to those defined in <b>prop</b>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 39 </td></tr>
    <tr><td class="paramname">prop</td><td>Property setting (see bitfield description)</td></tr>
  </table>
  </dd>
</dl>
<p>The bits in <b>prop</b> represent: </p><ul>
<li>Bit 7 - Priority flag. When this is set the sprites appear behind the background and window layer. <br  />
 0: infront <br  />
 1: behind </li>
<li>Bit 6 - Vertical flip. Dictates which way up the sprite is drawn vertically. <br  />
 0: normal <br  />
 1:upside down </li>
<li>Bit 5 - Horizontal flip. Dictates which way up the sprite is drawn horizontally. <br  />
 0: normal <br  />
 1:back to front </li>
<li>Bit 4 - DMG/Non-CGB Mode Only. Assigns either one of the two b/w palettes to the sprite. <br  />
 0: OBJ palette 0 <br  />
 1: OBJ palette 1 </li>
<li>Bit 3 - GBC only. Dictates from which bank of Sprite Tile Patterns the tile is taken. <br  />
 0: Bank 0 <br  />
 1: Bank 1 </li>
<li>Bit 2 - See bit 0. </li>
<li>Bit 1 - See bit 0. </li>
<li>Bit 0 - GBC only. Bits 0-2 indicate which of the 7 OBJ colour palettes the sprite is assigned.</li>
</ul>
<p>It's recommended to use GBDK constants (eg: S_FLIPY) to configure sprite properties as these are crossplatform.</p>
<div class="fragment"><div class="line"><span class="comment">// Load palette data into the first palette</span></div>
<div class="line"><a class="code" href="msx_8h.html#a7d5ed1aed79d8fd2894893d7f6f9b835">set_sprite_palette</a>(4, 1, exampleSprite_palettes)</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Set the OAM value for the sprite</span></div>
<div class="line"><span class="comment">// These flags tell the sprite to flip both vertically and horizontally.</span></div>
<div class="line"><a class="code" href="gb_8h.html#a99ea3252469e3614e977cce2aa1d06f7">set_sprite_prop</a>(0, <a class="code" href="gb_8h.html#a4bbb9cd6c38b2317de5256d1d889c63b">S_FLIPY</a> | <a class="code" href="gb_8h.html#ae97793b4039609f93b0f7f8bddb18011">S_FLIPX</a>);</div>
<div class="ttc" id="agb_8h_html_a4bbb9cd6c38b2317de5256d1d889c63b"><div class="ttname"><a href="gb_8h.html#a4bbb9cd6c38b2317de5256d1d889c63b">S_FLIPY</a></div><div class="ttdeci">#define S_FLIPY</div><div class="ttdef"><b>Definition:</b> gb.h:96</div></div>
<div class="ttc" id="agb_8h_html_a99ea3252469e3614e977cce2aa1d06f7"><div class="ttname"><a href="gb_8h.html#a99ea3252469e3614e977cce2aa1d06f7">set_sprite_prop</a></div><div class="ttdeci">void set_sprite_prop(uint8_t nb, uint8_t prop)</div><div class="ttdef"><b>Definition:</b> gb.h:1945</div></div>
<div class="ttc" id="agb_8h_html_ae97793b4039609f93b0f7f8bddb18011"><div class="ttname"><a href="gb_8h.html#ae97793b4039609f93b0f7f8bddb18011">S_FLIPX</a></div><div class="ttdeci">#define S_FLIPX</div><div class="ttdef"><b>Definition:</b> gb.h:92</div></div>
<div class="ttc" id="amsx_8h_html_a7d5ed1aed79d8fd2894893d7f6f9b835"><div class="ttname"><a href="msx_8h.html#a7d5ed1aed79d8fd2894893d7f6f9b835">set_sprite_palette</a></div><div class="ttdeci">#define set_sprite_palette(first_palette, nb_palettes, rgb_data)</div><div class="ttdef"><b>Definition:</b> msx.h:558</div></div>
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a54572cf6791463b6d60623837e0bb5a6">S_PALETTE</a>, <a class="el" href="gb_8h.html#ae97793b4039609f93b0f7f8bddb18011">S_FLIPX</a>, <a class="el" href="gb_8h.html#a4bbb9cd6c38b2317de5256d1d889c63b">S_FLIPY</a>, <a class="el" href="gb_8h.html#a9506d04c2ec7d2442a52054f67d2b32f">S_PRIORITY</a> </dd></dl>

</div>
</div>
<a id="a6b873c807c9e2c90fb574951e85fdf88"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b873c807c9e2c90fb574951e85fdf88">&#9670;&nbsp;</a></span>get_sprite_prop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> get_sprite_prop </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the OAM Property Flags of sprite number <b>nb</b>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 39 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a99ea3252469e3614e977cce2aa1d06f7">set_sprite_prop</a> for property bitfield settings </dd></dl>

</div>
</div>
<a id="ab42c12c1d9aed3fd963248fbea9830cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab42c12c1d9aed3fd963248fbea9830cd">&#9670;&nbsp;</a></span>move_sprite()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void move_sprite </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Moves sprite number <b>nb</b> to the <b>x</b>, <b>y</b> position on the screen.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 39 </td></tr>
    <tr><td class="paramname">x</td><td>X Position. Specifies the sprites horizontal position on the screen (minus 8). <br  />
 An offscreen value (X=0 or X&gt;=168) hides the sprite, but the sprite still affects the priority ordering - a better way to hide a sprite is to set its Y-coordinate offscreen. </td></tr>
    <tr><td class="paramname">y</td><td>Y Position. Specifies the sprites vertical position on the screen (minus 16). <br  />
 An offscreen value (for example, Y=0 or Y&gt;=160) hides the sprite.</td></tr>
  </table>
  </dd>
</dl>
<p>Moving the sprite to 0,0 (or similar off-screen location) will hide it. </p>

</div>
</div>
<a id="a6c59aa9a4f9ea42bed6ca6940b2741fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c59aa9a4f9ea42bed6ca6940b2741fe">&#9670;&nbsp;</a></span>scroll_sprite()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void scroll_sprite </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Moves sprite number <b>nb</b> relative to its current position.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 39 </td></tr>
    <tr><td class="paramname">x</td><td>Number of pixels to move the sprite on the <b>X axis</b> <br  />
 Range: -128 - 127 </td></tr>
    <tr><td class="paramname">y</td><td>Number of pixels to move the sprite on the <b>Y axis</b> <br  />
 Range: -128 - 127</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ab42c12c1d9aed3fd963248fbea9830cd">move_sprite</a> for more details about the X and Y position </dd></dl>

</div>
</div>
<a id="ad22c51635d052399bbbe1777999c794d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad22c51635d052399bbbe1777999c794d">&#9670;&nbsp;</a></span>hide_sprite()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void hide_sprite </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Hides sprite number <b>nb</b> by moving it to zero position by Y.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nb</td><td>Sprite number, range 0 - 39</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="sms_2metasprites_8h.html#a51db5a47025de1c8765885281999d53c">hide_sprites_range</a>, <a class="el" href="gb_8h.html#a69ef98aee664b8abd8d1a3d45f016dda">HIDE_SPRITES</a> </dd></dl>

</div>
</div>
<a id="a6148e40610bc542991df842c6b19e4c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6148e40610bc542991df842c6b19e4c9">&#9670;&nbsp;</a></span>set_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>vram_addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copies arbitrary data to an address in VRAM without taking into account the state of LCDC bits 3 or 4.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vram_addr</td><td>Pointer to destination VRAM Address </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to source buffer </td></tr>
    <tr><td class="paramname">len</td><td>Number of bytes to copy</td></tr>
  </table>
  </dd>
</dl>
<p>Copies <b>len</b> bytes from a buffer at <b>data</b> to VRAM starting at <b>vram_addr</b>.</p>
<p>GBC only: <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a> determines which bank of tile patterns are written to. </p><ul>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#ad21d032f4ab5d5cf21c4d455c4513046">VBK_BANK_0</a> indicates the first bank </li>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#afb1c02277ab645e83e2ee339e2f6a64f">VBK_BANK_1</a> indicates the second</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a1f5101f2b7bb0123c26a3e257f843626">set_bkg_data</a>, <a class="el" href="gb_8h.html#ac2bf0c4919c30d322fa5853c896e710f">set_win_data</a>, <a class="el" href="gb_8h.html#a6da9e2fa1bafd35363e84ee999909ec7">set_bkg_tiles</a>, <a class="el" href="gb_8h.html#a5c59b4ee6323af9832998906d087266b">set_win_tiles</a>, <a class="el" href="gb_8h.html#abe4846d4570b4880b0e54b9e503f4d30">set_tile_data</a>, <a class="el" href="gb_8h.html#a6224b2e4b72c062a2bb2959b0aaf860a">set_tiles</a> </dd></dl>

</div>
</div>
<a id="a77d34577e9f97ffaf8463c752115722b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77d34577e9f97ffaf8463c752115722b">&#9670;&nbsp;</a></span>get_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void get_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>vram_addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copies arbitrary data from an address in VRAM into a buffer without taking into account the state of LCDC bits 3 or 4.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vram_addr</td><td>Pointer to source VRAM Address </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to destination buffer </td></tr>
    <tr><td class="paramname">len</td><td>Number of bytes to copy</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>In general <b>avoid reading from VRAM</b> since that memory is not accessible at all times. It is also not supported by GBDK on the NES platform. See <a class="el" href="docs_coding_guidelines.html#best_practice_dont_read_vram">coding guidelines</a> for more details.</dd></dl>
<p>Copies <b>len</b> bytes from VRAM starting at <b>vram_addr</b> into a buffer at <b>data</b>.</p>
<p>GBC only: <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a> determines which bank of tile patterns are written to. </p><ul>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#ad21d032f4ab5d5cf21c4d455c4513046">VBK_BANK_0</a> indicates the first bank </li>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#afb1c02277ab645e83e2ee339e2f6a64f">VBK_BANK_1</a> indicates the second</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a5c13238dfec416439d75b133a272e6df">get_bkg_data</a>, <a class="el" href="gb_8h.html#a7ef32e7c1669aba48f235500a495baba">get_win_data</a>, <a class="el" href="gb_8h.html#aa6bcf24d97f93307b30f2906251f39a0">get_bkg_tiles</a>, <a class="el" href="gb_8h.html#a8a469de4c6640f921254b336b5a6191a">get_win_tiles</a>, <a class="el" href="gb_8h.html#af9830fb188433cb0305c2cefb8f8ab11">get_tiles</a> </dd></dl>

</div>
</div>
<a id="a2dd9f335a197647264f01a713bd31a70"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2dd9f335a197647264f01a713bd31a70">&#9670;&nbsp;</a></span>vmemcpy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vmemcpy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>dest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>sour</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copies arbitrary data from an address in VRAM into a buffer</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dest</td><td>Pointer to destination buffer (may be in VRAM) </td></tr>
    <tr><td class="paramname">sour</td><td>Pointer to source buffer (may be in VRAM) </td></tr>
    <tr><td class="paramname">len</td><td>Number of bytes to copy</td></tr>
  </table>
  </dd>
</dl>
<p>Copies <b>len</b> bytes from or to VRAM starting at <b>sour</b> into a buffer or to VRAM at <b>dest</b>.</p>
<p>GBC only: <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a> determines which bank of tile patterns are written to. </p><ul>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#ad21d032f4ab5d5cf21c4d455c4513046">VBK_BANK_0</a> indicates the first bank </li>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#afb1c02277ab645e83e2ee339e2f6a64f">VBK_BANK_1</a> indicates the second </li>
</ul>

</div>
</div>
<a id="a6224b2e4b72c062a2bb2959b0aaf860a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6224b2e4b72c062a2bb2959b0aaf860a">&#9670;&nbsp;</a></span>set_tiles()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_tiles </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>vram_addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>tiles</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets a rectangular region of Tile Map entries at a given VRAM Address without taking into account the state of LCDC bit 3.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 1 - 32 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 1 - 32 </td></tr>
    <tr><td class="paramname">vram_addr</td><td>Pointer to destination VRAM Address </td></tr>
    <tr><td class="paramname">tiles</td><td>Pointer to source Tile Map data</td></tr>
  </table>
  </dd>
</dl>
<p>Entries are copied from <b>tiles</b> to Tile Map at address vram_addr starting at <b>x</b>, <b>y</b> writing across for <b>w</b> tiles and down for <b>h</b> tiles.</p>
<p>One byte per source tile map entry.</p>
<p>There are two 32x32 Tile Maps in VRAM at addresses 9800h-9BFFh and 9C00h-9FFFh.</p>
<p>GBC only: <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a> determines whether Tile Numbers or Tile Attributes get set. </p><ul>
<li>VBK_REG = <a class="el" href="sms_2hardware_8h.html#a6b6b917fd4f396ba028bb18631165781">VBK_TILES</a> Tile Numbers are written </li>
<li>VBK_REG = <a class="el" href="sms_2hardware_8h.html#a418a105f4c7d4bf1cbc556eab72c27ca">VBK_ATTRIBUTES</a> Tile Attributes are written</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a6da9e2fa1bafd35363e84ee999909ec7">set_bkg_tiles</a>, <a class="el" href="gb_8h.html#a5c59b4ee6323af9832998906d087266b">set_win_tiles</a> </dd></dl>

</div>
</div>
<a id="abe4846d4570b4880b0e54b9e503f4d30"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe4846d4570b4880b0e54b9e503f4d30">&#9670;&nbsp;</a></span>set_tile_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void set_tile_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>base</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets VRAM Tile Pattern data starting from given base address without taking into account the state of LCDC bit 4.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first tile to write </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to (2 bpp) source Tile Pattern data. </td></tr>
    <tr><td class="paramname">base</td><td>MSB of the destination address in VRAM (usually 0x80 or 0x90 which gives 0x8000 or 0x9000)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a1f5101f2b7bb0123c26a3e257f843626">set_bkg_data</a>, <a class="el" href="gb_8h.html#ac2bf0c4919c30d322fa5853c896e710f">set_win_data</a>, <a class="el" href="gb_8h.html#a6148e40610bc542991df842c6b19e4c9">set_data</a> </dd></dl>

</div>
</div>
<a id="af9830fb188433cb0305c2cefb8f8ab11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af9830fb188433cb0305c2cefb8f8ab11">&#9670;&nbsp;</a></span>get_tiles()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void get_tiles </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>vram_addr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>tiles</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copies a rectangular region of Tile Map entries from a given VRAM Address into a buffer without taking into account the state of LCDC bit 3.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to copy in tiles. Range 0 - 31 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to copy in tiles. Range 0 - 31 </td></tr>
    <tr><td class="paramname">vram_addr</td><td>Pointer to source VRAM Address </td></tr>
    <tr><td class="paramname">tiles</td><td>Pointer to destination buffer for Tile Map data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>In general <b>avoid reading from VRAM</b> since that memory is not accessible at all times. It is also not supported by GBDK on the NES platform. See <a class="el" href="docs_coding_guidelines.html#best_practice_dont_read_vram">coding guidelines</a> for more details.</dd></dl>
<p>Entries are copied into <b>tiles</b> from the Background Tile Map starting at <b>x</b>, <b>y</b> reading across for <b>w</b> tiles and down for <b>h</b> tiles.</p>
<p>One byte per tile.</p>
<p>There are two 32x32 Tile Maps in VRAM at addresses 9800h - 9BFFh and 9C00h - 9FFFh.</p>
<p>The buffer pointed to by <b>tiles</b> should be at least <b>x</b> x <b>y</b> bytes in size.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#aa6bcf24d97f93307b30f2906251f39a0">get_bkg_tiles</a>, <a class="el" href="gb_8h.html#a8a469de4c6640f921254b336b5a6191a">get_win_tiles</a> </dd></dl>

</div>
</div>
<a id="a68651e50243349b48164a8ad983dca4e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a68651e50243349b48164a8ad983dca4e">&#9670;&nbsp;</a></span>set_native_tile_data()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_native_tile_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets VRAM Tile Pattern data in the native format</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first tile to write (0 - 511) </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to source Tile Pattern data.</td></tr>
  </table>
  </dd>
</dl>
<p>When <code>first_tile</code> is larger than 256 on the GB/AP, it will write to sprite data instead of background data.</p>
<p>The bit depth of the source Tile Pattern data depends on which console is being used: </p><ul>
<li>Game Boy/Analogue Pocket: loads 2bpp tiles data </li>
<li>SMS/GG: loads 4bpp tile data </li>
</ul>

</div>
</div>
<a id="acb5c235def5988696724051c5f838e74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb5c235def5988696724051c5f838e74">&#9670;&nbsp;</a></span>set_bkg_native_data()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_bkg_native_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets VRAM Tile Pattern data for the Background / Window in the native format</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first tile to write </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to source tile data</td></tr>
  </table>
  </dd>
</dl>
<p>Writes <b>nb_tiles</b> tiles to VRAM starting at <b>first_tile</b>, tile data is sourced from <b>data</b>.</p>
<p>GBC only: <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a> determines which bank of tile patterns are written to. </p><ul>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#ad21d032f4ab5d5cf21c4d455c4513046">VBK_BANK_0</a> indicates the first bank </li>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#afb1c02277ab645e83e2ee339e2f6a64f">VBK_BANK_1</a> indicates the second</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#ac2bf0c4919c30d322fa5853c896e710f">set_win_data</a>, <a class="el" href="gb_8h.html#abe4846d4570b4880b0e54b9e503f4d30">set_tile_data</a> </dd></dl>

</div>
</div>
<a id="aa9e3edd5311290cba933c382cf2f5898"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa9e3edd5311290cba933c382cf2f5898">&#9670;&nbsp;</a></span>set_sprite_native_data()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_sprite_native_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>first_tile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nb_tiles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets VRAM Tile Pattern data for Sprites in the native format</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">first_tile</td><td>Index of the first tile to write </td></tr>
    <tr><td class="paramname">nb_tiles</td><td>Number of tiles to write </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to source tile data</td></tr>
  </table>
  </dd>
</dl>
<p>Writes <b>nb_tiles</b> tiles to VRAM starting at <b>first_tile</b>, tile data is sourced from <b>data</b>.</p>
<p>GBC only: <a class="el" href="gb_2hardware_8h.html#a5ccae0d556500e1055a0ec8de20c535a">VBK_REG</a> determines which bank of tile patterns are written to. </p><ul>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#ad21d032f4ab5d5cf21c4d455c4513046">VBK_BANK_0</a> indicates the first bank </li>
<li>VBK_REG = <a class="el" href="gb_2hardware_8h.html#afb1c02277ab645e83e2ee339e2f6a64f">VBK_BANK_1</a> indicates the second </li>
</ul>

</div>
</div>
<a id="af6ac67037de041eb0141ba3725b1db83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af6ac67037de041eb0141ba3725b1db83">&#9670;&nbsp;</a></span>init_win()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void init_win </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initializes the entire Window Tile Map with Tile Number <b>c</b> </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>Tile number to fill with</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function avoids writes during modes 2 &amp; 3 </dd></dl>

</div>
</div>
<a id="a46058204097dd305bf72bc20ea7f7a3b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a46058204097dd305bf72bc20ea7f7a3b">&#9670;&nbsp;</a></span>init_bkg()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void init_bkg </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initializes the entire Background Tile Map with Tile Number <b>c</b> </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td>Tile number to fill with</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function avoids writes during modes 2 &amp; 3 </dd></dl>

</div>
</div>
<a id="a97bab71effd5e4e386629cb6ca5816cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a97bab71effd5e4e386629cb6ca5816cf">&#9670;&nbsp;</a></span>vmemset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vmemset </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="asm_2mos6502_2types_8h.html#a7c94ea6f8948649f8d181ae55911eeaf">size_t</a>&#160;</td>
          <td class="paramname"><em>n</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Fills the VRAM memory region <b>s</b> of size <b>n</b> with Tile Number <b>c</b> </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>Start address in VRAM </td></tr>
    <tr><td class="paramname">c</td><td>Tile number to fill with </td></tr>
    <tr><td class="paramname">n</td><td>Size of memory region (in bytes) to fill</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>This function avoids writes during modes 2 &amp; 3 </dd></dl>

</div>
</div>
<a id="a74c3f53fca019f7abcd1270650808849"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a74c3f53fca019f7abcd1270650808849">&#9670;&nbsp;</a></span>fill_bkg_rect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fill_bkg_rect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>tile</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Fills a rectangular region of Tile Map entries for the Background layer with tile.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in Background Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 0 - 31 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 0 - 31 </td></tr>
    <tr><td class="paramname">tile</td><td>Fill value </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ad5bc3dc922707507aa51ed7f5b4a21e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad5bc3dc922707507aa51ed7f5b4a21e3">&#9670;&nbsp;</a></span>fill_win_rect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void fill_win_rect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>tile</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Fills a rectangular region of Tile Map entries for the Window layer with tile.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>X Start position in Window Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">y</td><td>Y Start position in Window Map tile coordinates. Range 0 - 31 </td></tr>
    <tr><td class="paramname">w</td><td>Width of area to set in tiles. Range 0 - 31 </td></tr>
    <tr><td class="paramname">h</td><td>Height of area to set in tiles. Range 0 - 31 </td></tr>
    <tr><td class="paramname">tile</td><td>Fill value </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a0b3366755f3276b0243c1e0497471b7a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b3366755f3276b0243c1e0497471b7a">&#9670;&nbsp;</a></span>c</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void c</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a0a3d95ad0ab8ad213016101d2e9c3d3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0a3d95ad0ab8ad213016101d2e9c3d3e">&#9670;&nbsp;</a></span>d</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void d</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="aeda4515a31485c9688c4601ac5ce2d79"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeda4515a31485c9688c4601ac5ce2d79">&#9670;&nbsp;</a></span>e</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void e</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="aba4fa6f13f80e53daeb0caa7b1ec8afb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aba4fa6f13f80e53daeb0caa7b1ec8afb">&#9670;&nbsp;</a></span>h</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void h</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="af79b920bcb642bba2e652874c4f7eeff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af79b920bcb642bba2e652874c4f7eeff">&#9670;&nbsp;</a></span>l</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void l</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">{</div>
<div class="line">    __asm__(<span class="stringliteral">&quot;ei&quot;</span>)</div>
</div><!-- fragment -->
</div>
</div>
<a id="a874b9bd95b0a05d6a6072feabc879e45"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a874b9bd95b0a05d6a6072feabc879e45">&#9670;&nbsp;</a></span>_cpu</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> _cpu</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>GB CPU type</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a0031c07799247a6d6c1bfa3decac79d0">DMG_TYPE</a>, <a class="el" href="gb_8h.html#ae996ed4fd8bb6b308b9c8708a91df06b">MGB_TYPE</a>, <a class="el" href="gb_8h.html#aee435a3a0dde3dbd7b6112dbb456cde8">CGB_TYPE</a>, <a class="el" href="cgb_8h.html#a871b5b1aba74ab8764f72b73bc090adb">cpu_fast()</a>, <a class="el" href="cgb_8h.html#a476d06d0fe64d7c5a1ec05b8ee859a56">cpu_slow()</a>, <a class="el" href="gb_8h.html#a539b7b45b1c2d6b2051553665c76fd36">_is_GBA</a> </dd></dl>

</div>
</div>
<a id="a539b7b45b1c2d6b2051553665c76fd36"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a539b7b45b1c2d6b2051553665c76fd36">&#9670;&nbsp;</a></span>_is_GBA</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> _is_GBA</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>GBA detection</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a6ccf5d0f34fb0af0b6e73b9df0ccd745">GBA_DETECTED</a>, <a class="el" href="gb_8h.html#aa311f84dd9fce6e136ba4881e7b0d98d">GBA_NOT_DETECTED</a>, <a class="el" href="gb_8h.html#a874b9bd95b0a05d6a6072feabc879e45">_cpu</a> </dd></dl>

</div>
</div>
<a id="a78d2fd18666afec116f176d46debb4e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78d2fd18666afec116f176d46debb4e7">&#9670;&nbsp;</a></span>sys_time</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">volatile <a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> sys_time</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Global Time Counter in VBL periods (60Hz)</p>
<p>Increments once per Frame</p>
<p>Will wrap around every ~18 minutes (unsigned 16 bits = 65535 / 60 / 60 = 18.2) </p>

</div>
</div>
<a id="afcd1b4a4ad7bab85d0adec8c69d5bec0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afcd1b4a4ad7bab85d0adec8c69d5bec0">&#9670;&nbsp;</a></span>_vbl_done</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nes_2hardware_8h.html#afa5336aa76cfcbe00fc5dab15549bc23">__REG</a> _vbl_done</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Flag indicating the VBlank ISR has run</p>
<p>Flag gets cleared at the start of <a class="el" href="gb_8h.html#af57b77452ef377da18e4fbf0288013d1">vsync()</a> / <a class="el" href="gb_8h.html#a815f8ecad32d14b786a8ed1168518773">wait_vbl_done()</a> and set in the default VBlank ISR handler. </p>

</div>
</div>
<a id="a2e3415ce2f7fb63427618bd9b9cb6635"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e3415ce2f7fb63427618bd9b9cb6635">&#9670;&nbsp;</a></span>_io_status</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">volatile <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> _io_status</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Serial Link: Current IO Status. An OR of IO_* </p>

</div>
</div>
<a id="a02f3a1585ae654444e628c1aa98ef0cf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a02f3a1585ae654444e628c1aa98ef0cf">&#9670;&nbsp;</a></span>_io_in</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">volatile <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> _io_in</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Serial Link: Byte just read after calling <a class="el" href="gb_8h.html#a34d6500215984e8f9a986523a2f2dadd">receive_byte()</a> </p>

</div>
</div>
<a id="acae13736da20f9fc53e8d38934aa2119"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acae13736da20f9fc53e8d38934aa2119">&#9670;&nbsp;</a></span>_io_out</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">volatile <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> _io_out</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Serial Link: Write byte to send here before calling <a class="el" href="gb_8h.html#a1259cf3a23fd2166a9d1a2e93942e30e">send_byte()</a> </p>

</div>
</div>
<a id="a98b848953a95ce2fff6fda643575d74a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a98b848953a95ce2fff6fda643575d74a">&#9670;&nbsp;</a></span>_current_bank</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nes_2hardware_8h.html#afa5336aa76cfcbe00fc5dab15549bc23">__REG</a> _current_bank</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Tracks current active ROM bank</p>
<p>In most cases the <a class="el" href="sms_8h.html#ae042588f20bf5a2349c8ad8716245233">CURRENT_BANK</a> macro for this variable is recommended for use instead of the variable itself.</p>
<p>The active bank number is not tracked by <a class="el" href="nes_8h.html#a06bab3f8bce032de0d21fbd86e14c3f3">_current_bank</a> when <a class="el" href="gb_8h.html#a6c15ebc660abd3a978137493ab63ffe9">SWITCH_ROM_MBC5_8M</a> is used.</p>
<p>This variable is updated automatically when you call SWITCH_ROM_MBC1 or SWITCH_ROM_MBC5, <a class="el" href="gb_8h.html#af61262bbc05629f31020afce67e1b9ea">SWITCH_ROM()</a>, or call a BANKED function.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="gb_8h.html#a19558f5bbc9fea767f945001ae9cd13f">SWITCH_ROM_MBC1()</a>, <a class="el" href="gb_8h.html#a92d040284342702026eb19dab59b586e">SWITCH_ROM_MBC5()</a>, <a class="el" href="gb_8h.html#af61262bbc05629f31020afce67e1b9ea">SWITCH_ROM()</a> </dd></dl>

</div>
</div>
<a id="a4c2e4adef74067fdbb49005bc73de937"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c2e4adef74067fdbb49005bc73de937">&#9670;&nbsp;</a></span>b</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void b</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a250f5339e05523912926be566e9eb8c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a250f5339e05523912926be566e9eb8c0">&#9670;&nbsp;</a></span>_current_1bpp_colors</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> _current_1bpp_colors</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="aa82205e9629f984d0b3dc8055c211522"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa82205e9629f984d0b3dc8055c211522">&#9670;&nbsp;</a></span>_map_tile_offset</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> _map_tile_offset</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="ab472d9bbb1bcfd141374f5babc71934c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab472d9bbb1bcfd141374f5babc71934c">&#9670;&nbsp;</a></span>_submap_tile_offset</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> _submap_tile_offset</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a3619f9cb1e3c92238a033ead79a0c551"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3619f9cb1e3c92238a033ead79a0c551">&#9670;&nbsp;</a></span>shadow_OAM</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">volatile struct <a class="el" href="struct_o_a_m__item__t.html">OAM_item_t</a> shadow_OAM[]</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Shadow OAM array in WRAM, that is DMA-transferred into the real OAM each VBlank </p>

</div>
</div>
<a id="a7b662ae4d83f9837bacb9fd580673054"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b662ae4d83f9837bacb9fd580673054">&#9670;&nbsp;</a></span>_shadow_OAM_base</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nes_2hardware_8h.html#afa5336aa76cfcbe00fc5dab15549bc23">__REG</a> _shadow_OAM_base</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>MSB of shadow_OAM address is used by OAM DMA copying routine </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
</div>
</body>
</html>
